Joomla CMS  3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
Tout Structures de données Espaces de nommage Fichiers Fonctions Variables Pages
Référence de la classe JApplicationWebRouter
+ Graphe d'héritage de JApplicationWebRouter:

Fonctions membres publiques

 __construct (JApplicationWeb $app, JInput $input=null)
 
 execute ($route)
 
 setControllerPrefix ($prefix)
 
 setDefaultController ($name)
 

Fonctions membres protégées

 parseRoute ($route)
 
 fetchController ($name)
 

Attributs protégés

 $app
 
 $default
 
 $controllerPrefix
 
 $input
 

Description détaillée

Class to define an abstract Web application router.

Depuis
3.0
Obsolète:
4.0 Use the joomla/router package via Composer instead

Documentation des constructeurs et destructeur

◆ __construct()

__construct ( JApplicationWeb  $app,
JInput  $input = null 
)

Constructor.

Paramètres
JApplicationWeb$appThe web application on whose behalf we are routing the request.
JInput$inputAn optional input object from which to derive the route. If none is given than the input from the application object will be used.
Depuis
3.0

Références $app, $input, et null.

Documentation des fonctions membres

◆ execute()

execute (   $route)

Find and execute the appropriate controller based on a given route.

Paramètres
string$routeThe route string for which to find and execute a controller.
Renvoie
mixed The return value of the controller executed
Depuis
3.0
Exceptions
InvalidArgumentException
RuntimeException

Références $controller, $name, et $route.

◆ fetchController()

fetchController (   $name)
protected

Get a JController object for a given name.

Paramètres
string$nameThe controller name (excluding prefix) for which to fetch and instance.
Renvoie
JController
Depuis
3.0
Exceptions
RuntimeException

Références $class, $controller, et $name.

◆ parseRoute()

parseRoute (   $route)
abstractprotected

Parse the given route and return the name of a controller mapped to the given route.

Paramètres
string$routeThe route string for which to find and execute a controller.
Renvoie
string The controller name for the given route excluding prefix.
Depuis
3.0
Exceptions
InvalidArgumentException

◆ setControllerPrefix()

setControllerPrefix (   $prefix)

Set the controller name prefix.

Paramètres
string$prefixController class name prefix for creating controller objects by name.
Renvoie
JApplicationWebRouter This object for method chaining.
Depuis
3.0

Références $prefix.

◆ setDefaultController()

setDefaultController (   $name)

Set the default controller name.

Paramètres
string$nameThe default page controller name for an empty route.
Renvoie
JApplicationWebRouter This object for method chaining.
Depuis
3.0

Références $name.

Documentation des champs

◆ $app

$app
protected

◆ $controllerPrefix

$controllerPrefix
protected

◆ $default

$default
protected

◆ $input

$input
protected

La documentation de cette classe a été générée à partir du fichier suivant :