Abstract Class JApplicationWebRouter

Description

Class to define an abstract Web application router.

  • abstract:
  • since: 12.2

Located in /libraries/joomla/application/web/router.php (line 19)


	
			
Direct descendents
Class Description
 class JApplicationWebRouterBase Basic Web application router class for the Joomla Platform.
Variable Summary
Method Summary
 JApplicationWebRouter __construct (JApplicationWeb $app, [JInput $input = null])
 mixed execute (string $route)
 JController fetchController (string $name)
 string parseRoute (string $route)
Variables
JApplicationWeb $app (line 25)
  • var: The web application on whose behalf we are routing the request.
  • since: 12.2
  • access: protected
string $controllerPrefix (line 37)
  • var: Controller class name prefix for creating controller objects by name.
  • since: 12.2
  • access: protected
string $default (line 31)
  • var: The default page controller name for an empty route.
  • since: 12.2
  • access: protected
JInput $input (line 43)
  • var: An input object from which to derive the route.
  • since: 12.2
  • access: protected
Methods
Constructor __construct (line 54)

Constructor.

  • since: 12.2
  • access: public
JApplicationWebRouter __construct (JApplicationWeb $app, [JInput $input = null])
  • 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.
execute (line 71)

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

  • return: The return value of the controller executed
  • throws: InvalidArgumentException
  • throws: RuntimeException
  • since: 12.2
  • access: public
mixed execute (string $route)
  • string $route: The route string for which to find and execute a controller.

Redefined in descendants as:
fetchController (line 137)

Get a JController object for a given name.

  • since: 12.2
  • throws: RuntimeException
  • access: protected
JController fetchController (string $name)
  • string $name: The controller name (excluding prefix) for which to fetch and instance.
parseRoute (line 125)

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

  • return: The controller name for the given route excluding prefix.
  • abstract:
  • throws: InvalidArgumentException
  • since: 12.2
  • access: protected
string parseRoute (string $route)
  • string $route: The route string for which to find and execute a controller.

Redefined in descendants as:
setControllerPrefix (line 92)

Set the controller name prefix.

  • return: This object for method chaining.
  • since: 12.2
  • access: public
JApplicationWebRouter setControllerPrefix (string $prefix)
  • string $prefix: Controller class name prefix for creating controller objects by name.
setDefaultController (line 108)

Set the default controller name.

  • return: This object for method chaining.
  • since: 12.2
  • access: public
JApplicationWebRouter setDefaultController (string $name)
  • string $name: The default page controller name for an empty route.

Documentation generated on Tue, 19 Nov 2013 15:12:26 +0100 by phpDocumentor 1.4.3