|
| __construct (CMSApplicationInterface $app, array $maps=[]) |
|
| createCRUDRoutes ($baseName, $controller, $defaults=[], $publicGets=false) |
|
| parseApiRoute ($method='GET') |
|
| getRoutePath () |
|
| getMatchingRoutes () |
|
| parse (&$uri, $setVars=false) |
|
| build ($url) |
|
| setVar ($key, $value, $create=true) |
|
| setVars ($vars=array(), $merge=true) |
|
| getVar ($key) |
|
| getVars () |
|
| attachBuildRule (callable $callback, $stage=self::PROCESS_DURING) |
|
| attachParseRule (callable $callback, $stage=self::PROCESS_DURING) |
|
| detachRule ($type, $rule, $stage=self::PROCESS_DURING) |
|
| getRules () |
|
Joomla! API Router class
- Depuis
- 4.0.0
◆ __construct()
◆ createCRUDRoutes()
createCRUDRoutes |
( |
|
$baseName, |
|
|
|
$controller, |
|
|
|
$defaults = [] , |
|
|
|
$publicGets = false |
|
) |
| |
Creates routes map for CRUD
- Paramètres
-
string | $baseName | The base name of the component. |
string | $controller | The name of the controller that contains CRUD functions. |
array | $defaults | An array of default values that are used when the URL is matched. |
bool | $publicGets | Allow the public to make GET requests. |
- Renvoie
- void
- Depuis
- 4.0.0
◆ getMatchingRoutes()
Extract routes matching current route from all known routes.
- Renvoie
- []
- Depuis
- 4.0.0
Références $route.
◆ getRoutePath()
Get the path from the route and remove and leading or trailing slash.
- Renvoie
- string
- Depuis
- 4.0.0
In some environments (e.g. CLI we can't form a valid base URL). In this case we catch the exception thrown by URI and set an empty base URI for further work.
Références $path, $uri, Uri\base(), et Uri\getInstance().
◆ parseApiRoute()
parseApiRoute |
( |
|
$method = 'GET' | ) |
|
Parse the given route and return the name of a controller mapped to the given route.
- Paramètres
-
string | $method | Request method to match. One of GET, POST, PUT, DELETE, HEAD, OPTIONS, TRACE or PATCH |
- Renvoie
- array An array containing the controller and the matched variables.
- Depuis
- 4.0.0
- Exceptions
-
Références $i, $method, $query, $route, et Uri\getInstance().
◆ removeIndexPhpFromPath()
removeIndexPhpFromPath |
( |
string |
$path | ) |
|
|
private |
Removes the index.php from the route's path.
- Paramètres
-
- Renvoie
- string
- Depuis
- 4.0.0
Références $path.
◆ $app
La documentation de cette classe a été générée à partir du fichier suivant :