Route
class Route (View source)
Methods
__construct(string $path, mixed $cb)
Route constructor
mixed
getAction()
Get the action executed on the current route
middleware(array|string $middleware)
Add middleware
mixed
call()
Function to launch callback functions where the rule have matching.
string
getPath()
Get the path of the current road
string
getName()
Get the name of the route
array
getParameters()
Get the settings
string|null
getParameter(string $key)
Get a parameter element
bool
match(string $uri)
Lets check if the url of the query is conform to that defined by the router
Details
__construct(string $path, mixed $cb)
Route constructor
mixed
getAction()
Get the action executed on the current route
Route
middleware(array|string $middleware)
Add middleware
Route
where(array|string $where, string|null $regex_constraint = null)
Add the url rules
mixed
call()
Function to launch callback functions where the rule have matching.
Route
name(string $name)
To give a name to the road
string
getPath()
Get the path of the current road
string
getName()
Get the name of the route
array
getParameters()
Get the settings
string|null
getParameter(string $key)
Get a parameter element
bool
match(string $uri)
Lets check if the url of the query is conform to that defined by the router