Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Fonctions membres publiques | |
__construct (array $routes=[]) | |
addRoute (Route $route) | |
addRoutes (array $routes) | |
getRoutes () | |
parseRoute ($route, $method='GET') | |
get (string $pattern, $controller, array $rules=[], array $defaults=[]) | |
post (string $pattern, $controller, array $rules=[], array $defaults=[]) | |
put (string $pattern, $controller, array $rules=[], array $defaults=[]) | |
delete (string $pattern, $controller, array $rules=[], array $defaults=[]) | |
head (string $pattern, $controller, array $rules=[], array $defaults=[]) | |
options (string $pattern, $controller, array $rules=[], array $defaults=[]) | |
trace (string $pattern, $controller, array $rules=[], array $defaults=[]) | |
patch (string $pattern, $controller, array $rules=[], array $defaults=[]) | |
all (string $pattern, $controller, array $rules=[], array $defaults=[]) | |
serialize () | |
__serialize () | |
unserialize ($serialized) | |
__unserialize (array $data) | |
Attributs protégés | |
$routes = [] | |
A path router.
__construct | ( | array | $routes = [] | ) |
Constructor.
Route[]|array[] | $routes A list of route maps or Route objects to add to the router. |
Références Router\$routes, et Router\addRoutes().
__serialize | ( | ) |
Serialize the router.
Références Router\$routes.
Référencé par Router\serialize().
__unserialize | ( | array | $data | ) |
Unserialize the router.
array | $data | The serialized router. |
Références $data.
Référencé par Router\unserialize().
addRoute | ( | Route | $route | ) |
Add a route to the router.
Route | $route | The route definition |
Implémente RouterInterface.
Référencé par Router\addRoutes(), Router\all(), Router\delete(), Router\get(), Router\head(), Router\options(), Router\patch(), Router\post(), Router\put(), et Router\trace().
addRoutes | ( | array | $routes | ) |
Add an array of route maps or objects to the router.
Route[]|array[] | $routes A list of route maps or Route objects to add to the router. |
Implémente RouterInterface.
Références $route, Router\$routes, $this, et Router\addRoute().
Référencé par Router\__construct().
all | ( | string | $pattern, |
$controller, | |||
array | $rules = [] , |
||
array | $defaults = [] |
||
) |
Add a route to the router that accepts all request methods.
string | $pattern | The route pattern to use for matching. |
mixed | $controller | The controller to map to the given pattern. |
array | $rules | An array of regex rules keyed using the route variables. |
array | $defaults | An array of default values that are used when the URL is matched. |
Implémente RouterInterface.
Références Router\addRoute().
delete | ( | string | $pattern, |
$controller, | |||
array | $rules = [] , |
||
array | $defaults = [] |
||
) |
Add a DELETE route to the router.
string | $pattern | The route pattern to use for matching. |
mixed | $controller | The controller to map to the given pattern. |
array | $rules | An array of regex rules keyed using the route variables. |
array | $defaults | An array of default values that are used when the URL is matched. |
Implémente RouterInterface.
Références Router\addRoute().
get | ( | string | $pattern, |
$controller, | |||
array | $rules = [] , |
||
array | $defaults = [] |
||
) |
Add a GET route to the router.
string | $pattern | The route pattern to use for matching. |
mixed | $controller | The controller to map to the given pattern. |
array | $rules | An array of regex rules keyed using the route variables. |
array | $defaults | An array of default values that are used when the URL is matched. |
Implémente RouterInterface.
Références Router\addRoute().
getRoutes | ( | ) |
Get the routes registered with this router.
Implémente RouterInterface.
Références Router\$routes.
head | ( | string | $pattern, |
$controller, | |||
array | $rules = [] , |
||
array | $defaults = [] |
||
) |
Add a HEAD route to the router.
string | $pattern | The route pattern to use for matching. |
mixed | $controller | The controller to map to the given pattern. |
array | $rules | An array of regex rules keyed using the route variables. |
array | $defaults | An array of default values that are used when the URL is matched. |
Implémente RouterInterface.
Références Router\addRoute().
options | ( | string | $pattern, |
$controller, | |||
array | $rules = [] , |
||
array | $defaults = [] |
||
) |
Add a OPTIONS route to the router.
string | $pattern | The route pattern to use for matching. |
mixed | $controller | The controller to map to the given pattern. |
array | $rules | An array of regex rules keyed using the route variables. |
array | $defaults | An array of default values that are used when the URL is matched. |
Implémente RouterInterface.
Références Router\addRoute().
parseRoute | ( | $route, | |
$method = 'GET' |
|||
) |
Parse the given route and return the information about the route, including the controller assigned to the route.
string | $route | The route string for which to find and execute a controller. |
string | $method | Request method to match, should be a valid HTTP request method. |
Exception |
Implémente RouterInterface.
patch | ( | string | $pattern, |
$controller, | |||
array | $rules = [] , |
||
array | $defaults = [] |
||
) |
Add a PATCH route to the router.
string | $pattern | The route pattern to use for matching. |
mixed | $controller | The controller to map to the given pattern. |
array | $rules | An array of regex rules keyed using the route variables. |
array | $defaults | An array of default values that are used when the URL is matched. |
Implémente RouterInterface.
Références Router\addRoute().
post | ( | string | $pattern, |
$controller, | |||
array | $rules = [] , |
||
array | $defaults = [] |
||
) |
Add a POST route to the router.
string | $pattern | The route pattern to use for matching. |
mixed | $controller | The controller to map to the given pattern. |
array | $rules | An array of regex rules keyed using the route variables. |
array | $defaults | An array of default values that are used when the URL is matched. |
Implémente RouterInterface.
Références Router\addRoute().
put | ( | string | $pattern, |
$controller, | |||
array | $rules = [] , |
||
array | $defaults = [] |
||
) |
Add a PUT route to the router.
string | $pattern | The route pattern to use for matching. |
mixed | $controller | The controller to map to the given pattern. |
array | $rules | An array of regex rules keyed using the route variables. |
array | $defaults | An array of default values that are used when the URL is matched. |
Implémente RouterInterface.
Références Router\addRoute().
serialize | ( | ) |
Serialize the router.
Références Router\__serialize().
trace | ( | string | $pattern, |
$controller, | |||
array | $rules = [] , |
||
array | $defaults = [] |
||
) |
Add a TRACE route to the router.
string | $pattern | The route pattern to use for matching. |
mixed | $controller | The controller to map to the given pattern. |
array | $rules | An array of regex rules keyed using the route variables. |
array | $defaults | An array of default values that are used when the URL is matched. |
Implémente RouterInterface.
Références Router\addRoute().
unserialize | ( | $serialized | ) |
Unserialize the router.
string | $serialized | The serialized router. |
Références Router\__unserialize().
|
protected |
Référencé par Router\__construct(), Router\__serialize(), Router\addRoutes(), et Router\getRoutes().