Route
in package
A route is an attribute or @route tag that can be 'discovered' by the {@see Router::loadFrom} method.s
These enable one to declare their routes beside the action handlers.
Attributes
- #[Attribute]
- \Attribute::TARGET_METHOD | \Attribute::IS_REPEATABLE
Table of Contents
Properties
- $rule : string
Methods
- __construct() : mixed
- Create a route.
- parseDoc() : array<string|int, Route>
- Create a set of routes from a doc comment.
Properties
$rule
public
string
$rule
Methods
__construct()
Create a route.
public
__construct(string $rule) : mixed
The attached method is the callable 'target'.
Parameters
- $rule : string
parseDoc()
Create a set of routes from a doc comment.
public
static parseDoc(string $doc) : array<string|int, Route>
This parses a '@route' tag.
Parameters
- $doc : string