Class JApplicationWebRouterRest

Description

RESTful Web application router class for the Joomla Platform.

  • since: 12.2

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

JApplicationWebRouter
   |
   --JApplicationWebRouterBase
      |
      --JApplicationWebRouterRest
Variable Summary
Method Summary
 void execute (string $route)
 JApplicationWebRouter setHttpMethodSuffix (string $method, string $suffix)
 void setMethodInPostRequest (boolean $value)
Variables
boolean $methodInPostRequest = false (line 26)
  • var: A boolean allowing to pass _method as parameter in POST requests
  • since: 12.2
  • access: protected
array $suffixMap = array(
'GET' => 'Get',
'POST' => 'Create',
'PUT' => 'Update',
'PATCH' => 'Update',
'DELETE' => 'Delete',
'HEAD' => 'Head',
'OPTIONS' => 'Options'
)
(line 32)
  • var: An array of HTTP Method => controller suffix pairs for routing the request.
  • since: 12.2
  • access: protected

Inherited Variables

Inherited from JApplicationWebRouterBase

JApplicationWebRouterBase::$maps

Inherited from JApplicationWebRouter

JApplicationWebRouter::$app
JApplicationWebRouter::$controllerPrefix
JApplicationWebRouter::$default
JApplicationWebRouter::$input
Methods
execute (line 53)

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

  • throws: InvalidArgumentException
  • throws: RuntimeException
  • since: 12.2
  • access: public
void execute (string $route)
  • string $route: The route string for which to find and execute a controller.

Redefinition of:
JApplicationWebRouter::execute()
Find and execute the appropriate controller based on a given route.
fetchControllerSuffix (line 119)

Get the controller class suffix string.

  • since: 12.2
  • throws: RuntimeException
  • access: protected
string fetchControllerSuffix ()
isMethodInPostRequest (line 106)

Get the property to allow or not method in POST request

  • since: 12.2
  • access: public
boolean isMethodInPostRequest ()
setHttpMethodSuffix (line 78)

Set a controller class suffix for a given HTTP method.

  • return: This object for method chaining.
  • since: 12.2
  • access: public
JApplicationWebRouter setHttpMethodSuffix (string $method, string $suffix)
  • string $method: The HTTP method for which to set the class suffix.
  • string $suffix: The class suffix to use when fetching the controller name for a given request.
setMethodInPostRequest (line 94)

Set to allow or not method in POST request

  • since: 12.2
  • access: public
void setMethodInPostRequest (boolean $value)
  • boolean $value: A boolean to allow or not method in POST request

Inherited Methods

Inherited From JApplicationWebRouterBase

 JApplicationWebRouterBase::addMap()
 JApplicationWebRouterBase::addMaps()
 JApplicationWebRouterBase::parseRoute()

Inherited From JApplicationWebRouter

 JApplicationWebRouter::__construct()
 JApplicationWebRouter::execute()
 JApplicationWebRouter::fetchController()
 JApplicationWebRouter::parseRoute()
 JApplicationWebRouter::setControllerPrefix()
 JApplicationWebRouter::setDefaultController()

Documentation generated on Tue, 19 Nov 2013 15:11:54 +0100 by phpDocumentor 1.4.3