RESTfulRoute
in package
implements
IRoute
Table of Contents
Interfaces
- IRoute
- Interface IRequestAction
Properties
- $accessPermission : string|null
- $aliasResolver : mixed
- $contentFormatter : IContentFormatter|null
- $versionResolver : mixed
Methods
- __construct() : void
- Generates a new RESTful route with the given parameters
- accessPermission() : null|string
- Returns the required permission to execute this action, or null if it is not restricted.
- DefaultAliasResolver() : mixed
- The default alias resolver for RESTful routes
- DefaultVersionResolver() : mixed
- exec() : mixed
- Executes the action and returns the result.
Properties
$accessPermission
private
string|null
$accessPermission
$aliasResolver
private
mixed
$aliasResolver
$contentFormatter
private
IContentFormatter|null
$contentFormatter
$versionResolver
private
mixed
$versionResolver
Methods
__construct()
Generates a new RESTful route with the given parameters
public
__construct([mixed $accessPermission = null ][, mixed $aliasResolver = null ][, mixed $versionResolver = null ][, IContentFormatter|null $contentFormatter = null ]) : void
Parameters
- $accessPermission : mixed = null
-
The access permission required to access this route (null if no permission is required)
- $aliasResolver : mixed = null
-
A function that resolves the alias of the route (default is a function that gets the "path" query parameter)
- $versionResolver : mixed = null
- $contentFormatter : IContentFormatter|null = null
-
The content formatter to use for this route (if null we try to get the requested one)
accessPermission()
Returns the required permission to execute this action, or null if it is not restricted.
public
accessPermission() : null|string
Return values
null|stringDefaultAliasResolver()
The default alias resolver for RESTful routes
public
static DefaultAliasResolver(mixed $parameterName) : mixed
Parameters
- $parameterName : mixed
-
The name of the parameter to get the alias from
DefaultVersionResolver()
public
static DefaultVersionResolver(mixed $parameterName) : mixed
Parameters
- $parameterName : mixed
exec()
Executes the action and returns the result.
public
exec(mixed $args) : mixed
Parameters
- $args : mixed