Route
in package
Table of Contents
- $action : mixed
- $matched : mixed
- $method : mixed
- $name : mixed
- $params : mixed
- $path : mixed
- $type : mixed
- __construct() : mixed
- Create a new Route.
- getDefaultParams() : array<string|int, mixed>
- Get the default parameters for creating a route
- getNamedParams() : array<string|int, mixed>
- Get all the parameter names from the url Eg: /user/:id/edit would return ['id']
- match() : bool
- Check if the route matches the current request
Properties
$action
public
mixed
$action
$matched
public
mixed
$matched
$method
public
mixed
$method
$name
public
mixed
$name
$params
public
mixed
$params
$path
public
mixed
$path
$type
public
mixed
$type
Methods
__construct()
Create a new Route.
public
__construct(mixed $params) : mixed
Parameters
- $params : mixed
Return values
mixed —getDefaultParams()
Get the default parameters for creating a route
public
static getDefaultParams() : array<string|int, mixed>
Return values
array<string|int, mixed> —getNamedParams()
Get all the parameter names from the url Eg: /user/:id/edit would return ['id']
public
getNamedParams() : array<string|int, mixed>
Return values
array<string|int, mixed> —match()
Check if the route matches the current request
public
match() : bool