classe Route (Voir la source)

Méthodes

__construct(string $path, callable $cb)

Route constructor

string
getPath()

Get the path of the current road

mixed
getAction()

Get the action executed on the current route

middleware(array|string $middleware)

Add middleware

where(array|string $where, string $regex_constraint = null)

Add the url rules

mixed
call()

Function to launch callback functions where the rule have matching.

name(string $name)

To give a name to the 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

Détails

__construct(string $path, callable $cb)

Route constructor

Paramètres

string $path
callable $cb

Exceptions

string getPath()

Get the path of the current road

Valeur de retour

string

mixed getAction()

Get the action executed on the current route

Valeur de retour

mixed

Route middleware(array|string $middleware)

Add middleware

Paramètres

array|string $middleware

Valeur de retour

Route

Route where(array|string $where, string $regex_constraint = null)

Add the url rules

Paramètres

array|string $where
string $regex_constraint

Valeur de retour

Route

mixed call()

Function to launch callback functions where the rule have matching.

Valeur de retour

mixed

Exceptions

name(string $name)

To give a name to the road

Paramètres

string $name

string getName()

Get the name of the route

Valeur de retour

string

array getParameters()

Get the settings

Valeur de retour

array

string|null getParameter(string $key)

Get a parameter element

Paramètres

string $key

Valeur de retour

string|null

bool match(string $uri)

Lets check if the url of the query is conform to that defined by the router

Paramètres

string $uri

Valeur de retour

bool