Метод | Описание | |
---|---|---|
appendRoutes ( |
Adds a route to the end of the current route collection. | |
execute ( |
Execute callback from MatchedRoute and return result. Required callback structure is:
Callback:
Class: \Your\Class
Method: handle
Static: true // (Optional, "false" by default) |
|
generate ( string $name, array $parameters = [], boolean $absolute = true ) : string | Generate a url from a route. | |
getCache ( ) : boolean | |
Get the current cache parameter. | |
getRouteCollection ( ) : |
||
initialize ( ) | Initializes the Route by reading the default config, registering routes and creating necessary object instances. | |
match ( string | |
Tries to match the given url against current RouteCollection. | |
prependRoutes ( |
Adds a route to the beginning of the current route collection. | |
setCache ( boolean | |
Sets the cache parameter. | |
setRouteCollection ( |
Overwrite the current route collection with the defined one. |
Метод | Описание | |
---|---|---|
init ( ) | Initialize based on singleton callback. | |
postSetConfig ( ) | Post setConfig callback. |
Метод | Описание | |
---|---|---|
loadFromCache ( string $path ) : boolean | string | Get a value from cache. | |
saveToCache ( string $path, string $value ) | Save the given value into cache. |
public appendRoutes ( |
||
$routes | An instance of ConfigObject holding the routes. |
public generate ( string $name, array $parameters = [], boolean $absolute = true ) : string | ||
$name | string | Name of the Route. |
$parameters | array | List of parameters that need to be replaced within the Route path. |
$absolute | boolean | Do you want to get the absolute url or relative. Default is absolute. |
Результат | string | Generated url. |
public static getRouteCollection ( ) : |
||
Результат |
public initialize ( ) |
protected static postSetConfig ( ) |
public prependRoutes ( |
||
$routes | An instance of ConfigObject holding the routes. |
public setRouteCollection ( |
||
$routeCollection | RouteCollection to install. |