Router.
More...
|
static | slashPath ($path) |
|
static | start () |
|
static | startRest () |
|
static | getRoute ($path, $cachedResponse=true) |
|
static | getRouteInfoByControllerAction ($controller, $action) |
|
static | filterRoutes ($path) |
|
static | getRouteInfo ($path) |
|
static | getAnnotations ($controllerName, $actionName) |
|
static | getRouteByName ($name, $parameters=[], $absolute=true) |
| Returns the generated path from a route. More...
|
|
static | path ($name, $parameters=[], $absolute=false) |
| Returns the generated path from a route. More...
|
|
static | url ($name, $parameters=[]) |
| Returns the generated url from a route. More...
|
|
static | getRouteUrlParts ($routeArray, $params, $cached=false, $duration=NULL, $cachedResponse=true) |
|
static | setExpired ($routePath, $expired=true) |
| Déclare une route comme étant expirée ou non. More...
|
|
static | addRoute ($path, $controller, $action="index", $methods=null, $name="", $cache=false, $duration=null, $requirements=[]) |
|
static | addRouteToRoutes (&$routesArray, $path, $controller, $action="index", $methods=null, $name="", $cache=false, $duration=null, $requirements=[]) |
|
Router.
- Author
- jc
- Version
- 1.0.0.2
Definition at line 16 of file Router.php.
◆ _getURL()
static _getURL |
( |
|
$routePath, |
|
|
|
$params |
|
) |
| |
|
staticprotected |
◆ addRoute()
static addRoute |
( |
|
$path, |
|
|
|
$controller, |
|
|
|
$action = "index" , |
|
|
|
$methods = null , |
|
|
|
$name = "" , |
|
|
|
$cache = false , |
|
|
|
$duration = null , |
|
|
|
$requirements = [] |
|
) |
| |
|
static |
- Parameters
-
string | $path | |
string | $controller | |
string | $action | |
array | null | $methods | |
string | $name | |
boolean | $cache | |
int | $duration | |
array | $requirements | |
Definition at line 226 of file Router.php.
◆ addRouteToRoutes()
static addRouteToRoutes |
( |
& |
$routesArray, |
|
|
|
$path, |
|
|
|
$controller, |
|
|
|
$action = "index" , |
|
|
|
$methods = null , |
|
|
|
$name = "" , |
|
|
|
$cache = false , |
|
|
|
$duration = null , |
|
|
|
$requirements = [] |
|
) |
| |
|
static |
◆ checkRouteName()
static checkRouteName |
( |
|
$routeDetails, |
|
|
|
$name |
|
) |
| |
|
staticprotected |
◆ cleanParam()
static cleanParam |
( |
|
$param | ) |
|
|
staticprivate |
◆ filterRoutes()
static filterRoutes |
( |
|
$path | ) |
|
|
static |
◆ getAnnotations()
static getAnnotations |
( |
|
$controllerName, |
|
|
|
$actionName |
|
) |
| |
|
static |
◆ getRoute()
static getRoute |
( |
|
$path, |
|
|
|
$cachedResponse = true |
|
) |
| |
|
static |
◆ getRouteByName()
static getRouteByName |
( |
|
$name, |
|
|
|
$parameters = [] , |
|
|
|
$absolute = true |
|
) |
| |
|
static |
Returns the generated path from a route.
- Parameters
-
string | $name | name of the route |
array | $parameters | array of the route parameters. default : [] |
boolean | $absolute | |
Definition at line 108 of file Router.php.
◆ getRouteInfo()
static getRouteInfo |
( |
|
$path | ) |
|
|
static |
◆ getRouteInfoByControllerAction()
static getRouteInfoByControllerAction |
( |
|
$controller, |
|
|
|
$action |
|
) |
| |
|
static |
◆ getRouteUrlParts()
static getRouteUrlParts |
( |
|
$routeArray, |
|
|
|
$params, |
|
|
|
$cached = false , |
|
|
|
$duration = NULL , |
|
|
|
$cachedResponse = true |
|
) |
| |
|
static |
◆ path()
static path |
( |
|
$name, |
|
|
|
$parameters = [] , |
|
|
|
$absolute = false |
|
) |
| |
|
static |
Returns the generated path from a route.
- Parameters
-
string | $name | the route name |
array | $parameters | default: [] |
boolean | $absolute | true if the path is absolute (/ at first) |
- Returns
- boolean|string|array|mixed the generated path (/path/to/route)
Definition at line 133 of file Router.php.
◆ setExpired()
static setExpired |
( |
|
$routePath, |
|
|
|
$expired = true |
|
) |
| |
|
static |
Déclare une route comme étant expirée ou non.
- Parameters
-
string | $routePath | |
boolean | $expired | |
Definition at line 211 of file Router.php.
◆ slashPath()
static slashPath |
( |
|
$path | ) |
|
|
static |
◆ start()
◆ startRest()
◆ url()
static url |
( |
|
$name, |
|
|
|
$parameters = [] |
|
) |
| |
|
static |
Returns the generated url from a route.
- Parameters
-
string | $name | the route name |
array | $parameters | default: [] |
- Returns
- string the generated url (http://myApp/path/to/route)
Definition at line 146 of file Router.php.
◆ $routes
The documentation for this class was generated from the following file: