JApplicationWebRouter
Class to define an abstract Web application router.
since |
3.0 |
---|---|
deprecated |
4.0 Use the |
package |
Joomla.Platform |
Methods
__construct
Constructor.
__construct(\JApplicationWeb $app, \JInput $input = null)
since |
3.0 |
---|
Arguments
- $app
\JApplicationWeb
The web application on whose behalf we are routing the request.- $input
\JInput
An optional input object from which to derive the route. If none is given than the input from the application object will be used.
execute
Find and execute the appropriate controller based on a given route.
execute(string $route) : mixed
since |
3.0 |
---|---|
throws |
|
Arguments
- $route
string
The route string for which to find and execute a controller.
Response
mixed
The return value of the controller executed
fetchController
Get a JController object for a given name.
fetchController(string $name) : \JController
since |
3.0 |
---|---|
throws |
|
Arguments
- $name
string
The controller name (excluding prefix) for which to fetch and instance.
Response
parseRoute
Parse the given route and return the name of a controller mapped to the given route.
parseRoute(string $route) : string
since |
3.0 |
---|---|
throws |
|
Arguments
- $route
string
The route string for which to find and execute a controller.
Response
string
The controller name for the given route excluding prefix.
setControllerPrefix
Set the controller name prefix.
setControllerPrefix(string $prefix) : \JApplicationWebRouter
since |
3.0 |
---|
Arguments
- $prefix
string
Controller class name prefix for creating controller objects by name.
Response
\JApplicationWebRouter
This object for method chaining.
setDefaultController
Set the default controller name.
setDefaultController(string $name) : \JApplicationWebRouter
since |
3.0 |
---|
Arguments
- $name
string
The default page controller name for an empty route.
Response
\JApplicationWebRouter
This object for method chaining.
Properties
app
The web application on whose behalf we are routing the request.
since |
3.0 |
---|
Type(s)
\JApplicationWeb
default
The default page controller name for an empty route.
since |
3.0 |
---|
Type(s)
string
controllerPrefix
Controller class name prefix for creating controller objects by name.
since |
3.0 |
---|
Type(s)
string
input
An input object from which to derive the route.
since |
3.0 |
---|
Type(s)
\JInput