class JApplicationWebRouter

Class to define an abstract Web application router.

Methods

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

Constructor.

mixed
execute( string $route)

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

setControllerPrefix( string $prefix)

Set the controller name prefix.

setDefaultController( string $name)

Set the default controller name.

Details

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

Constructor.

Parameters

JApplicationWeb $app The web application on whose behalf we are routing the request.
JInput $input An optional input object from which to derive the route. If none is given than the input from the application object will be used.

mixed execute( string $route)

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

Parameters

string $route The route string for which to find and execute a controller.

Return Value

mixed The return value of the controller executed

Exceptions

InvalidArgumentException
RuntimeException

JApplicationWebRouter setControllerPrefix( string $prefix)

Set the controller name prefix.

Parameters

string $prefix Controller class name prefix for creating controller objects by name.

Return Value

JApplicationWebRouter This object for method chaining.

JApplicationWebRouter setDefaultController( string $name)

Set the default controller name.

Parameters

string $name The default page controller name for an empty route.

Return Value

JApplicationWebRouter This object for method chaining.