PHP Class Drahak\Restful\Application\Routes\ResourceRoute

Author: Drahomír Hanák
Inheritance: extends Nette\Application\Routers\Route, implements Drahak\Restful\Application\IResourceRouter
Datei anzeigen Open project: drahak/restful Class Usage Examples

Protected Properties

Property Type Description
$actionDictionary array

Public Methods

Method Description
__construct ( string $mask, array | string $metadata = [], integer $flags = IResourceRouter::GET )
getActionDictionary ( ) : array | null Get action dictionary
getMethod ( Nette\Http\IRequest $httpRequest ) : string | null Get request method flag
isMethod ( integer $method ) : boolean Is this route mapped to given method
match ( Nette\Http\IRequest $httpRequest ) : Nette\Application\Request | null
setActionDictionary ( $actionDictionary ) Set action dictionary

Protected Methods

Method Description
formatActionName ( string $action, array $parameters ) : string Format action name

Method Details

__construct() public method

public __construct ( string $mask, array | string $metadata = [], integer $flags = IResourceRouter::GET )
$mask string
$metadata array | string
$flags integer

formatActionName() protected static method

Format action name
protected static formatActionName ( string $action, array $parameters ) : string
$action string
$parameters array
return string

getActionDictionary() public method

Get action dictionary
public getActionDictionary ( ) : array | null
return array | null

getMethod() public method

Get request method flag
public getMethod ( Nette\Http\IRequest $httpRequest ) : string | null
$httpRequest Nette\Http\IRequest
return string | null

isMethod() public method

Is this route mapped to given method
public isMethod ( integer $method ) : boolean
$method integer
return boolean

match() public method

public match ( Nette\Http\IRequest $httpRequest ) : Nette\Application\Request | null
$httpRequest Nette\Http\IRequest
return Nette\Application\Request | null

setActionDictionary() public method

Set action dictionary
public setActionDictionary ( $actionDictionary )

Property Details

$actionDictionary protected_oe property

protected array $actionDictionary
return array