Route
class Route (View source)
Methods
Route constructor
Get the action executed on the current route
Add middleware
Set the domain pattern for the route
Get the domain pattern for the route
Function to launch callback functions where the rule have matching.
Get the path of the current road
Get the name of the route
Get the settings
Get a parameter element
Lets check if the url of the query is conform to that defined by the router
Details
__construct(string $path, mixed $callback)
Route constructor
mixed
getAction()
Get the action executed on the current route
Route
middleware(array|string $middleware)
Add middleware
Route
withDomain(string $domain_pattern)
Set the domain pattern for the route
string|null
getDomain()
Get the domain pattern for the route
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|null
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, string|null $host = null)
Lets check if the url of the query is conform to that defined by the router