As the name says, it is made to be basic and direct.
Route Class
Name | Description |
---|---|
__construct | Function __construct |
getArguments | Function getArguments |
Get route arguments | |
getCallback | Function getCallback |
Get route callback if this is a Closure, else return null | |
getCallbackString | Function getCallbackString |
Get route callback if this is a string, else return null | |
getMethod | Function getMethod |
Get route method | |
getMiddlewares | Function getMiddlewares |
Get a array with route middlewares keys | |
getName | Function getName |
Get route name/url | |
setArgument | Function setArgument |
Set route argument | |
setArguments | Function setArguments |
Set route arguments | |
setCallback | Function setCallback |
Set route a callback |
Description
public __construct (string $url, string $method, mixed $callback, mixed $middlewares)
Function __construct
Parameters
(string) $url
(string) $method
(mixed) $callback
(mixed) $middlewares
Return Values
void
Description
public getArguments (void)
Function getArguments Get route arguments
Parameters
This function has no parameters.
Return Values
array
Description
public getCallback (void)
Function getCallback Get route callback if this is a Closure, else return null
Parameters
This function has no parameters.
Return Values
\Closure|string|null
Description
public getCallbackString (void)
Function getCallbackString Get route callback if this is a string, else return null
Parameters
This function has no parameters.
Return Values
string|null
Description
public getMethod (void)
Function getMethod Get route method
Parameters
This function has no parameters.
Return Values
string
Description
public getMiddlewares (void)
Function getMiddlewares Get a array with route middlewares keys
Parameters
This function has no parameters.
Return Values
array
Description
public getName (void)
Function getName Get route name/url
Parameters
This function has no parameters.
Return Values
string
Description
public setArgument (string $key, mixed $value)
Function setArgument Set route argument
Parameters
(string) $key
(mixed) $value
Return Values
\Route
Description
public setArguments (array $args)
Function setArguments Set route arguments
Parameters
(array) $args
Return Values
\Route
Description
public setCallback (void)
Function setCallback Set route a callback
Parameters
This function has no parameters.
Return Values
\Route