PHP Class AdamStipak\RestRoute

Author: Adam Štipák ([email protected])
Inheritance: extends Nette\Object, implements Nette\Application\IRouter
Mostrar archivo Open project: newPOPE/Nette-RestRoute Class Usage Examples

Protected Properties

Property Type Description
$defaultFormat string
$formats array
$module string
$path string
$useURLModuleVersioning boolean
$versionRegex string
$versionToModuleMapping array

Public Methods

Method Description
__construct ( $module = NULL, $defaultFormat = 'json' )
constructUrl ( Nette\Application\Request $appRequest, Url $refUrl ) : string | null Constructs absolute URL from Request object.
getDefaultFormat ( ) : string
getPath ( ) : string
match ( Nette\Http\IRequest $httpRequest ) : Nette\Application\Request | null Maps HTTP request to a Request object.
useURLModuleVersioning ( string $versionRegex, array $moduleMapping )

Protected Methods

Method Description
detectAction ( Nette\Http\IRequest $request )
detectMethod ( Nette\Http\IRequest $request ) : string
readInput ( ) : array | null

Private Methods

Method Description
detectFormat ( Nette\Http\IRequest $request ) : string

Method Details

__construct() public method

public __construct ( $module = NULL, $defaultFormat = 'json' )

constructUrl() public method

Constructs absolute URL from Request object.
public constructUrl ( Nette\Application\Request $appRequest, Url $refUrl ) : string | null
$appRequest Nette\Application\Request
$refUrl Nette\Http\Url
return string | null

detectAction() protected method

protected detectAction ( Nette\Http\IRequest $request )
$request Nette\Http\IRequest

detectMethod() protected method

protected detectMethod ( Nette\Http\IRequest $request ) : string
$request Nette\Http\IRequest
return string

getDefaultFormat() public method

public getDefaultFormat ( ) : string
return string

getPath() public method

public getPath ( ) : string
return string

match() public method

Maps HTTP request to a Request object.
public match ( Nette\Http\IRequest $httpRequest ) : Nette\Application\Request | null
$httpRequest Nette\Http\IRequest
return Nette\Application\Request | null

readInput() protected method

protected readInput ( ) : array | null
return array | null

useURLModuleVersioning() public method

public useURLModuleVersioning ( string $versionRegex, array $moduleMapping )
$versionRegex string
$moduleMapping array

Property Details

$defaultFormat protected_oe property

protected string $defaultFormat
return string

$formats protected_oe property

protected array $formats
return array

$module protected_oe property

protected string $module
return string

$path protected_oe property

protected string $path
return string

$useURLModuleVersioning protected_oe property

protected bool $useURLModuleVersioning
return boolean

$versionRegex protected_oe property

protected string $versionRegex
return string

$versionToModuleMapping protected_oe property

protected array $versionToModuleMapping
return array