TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
Request Class Reference
Inheritance diagram for Request:
RequestInterface Request ReferringRequest WidgetRequest

Public Member Functions

 setDispatched ($flag)
 
 isDispatched ()
 
 getControllerObjectName ()
 
 setControllerObjectName ($controllerObjectName)
 
 setPluginName ($pluginName=null)
 
 getPluginName ()
 
 setControllerExtensionName ($controllerExtensionName)
 
 getControllerExtensionName ()
 
 getControllerExtensionKey ()
 
 setControllerSubpackageKey ($subpackageKey)
 
 getControllerSubpackageKey ()
 
 setControllerName ($controllerName)
 
 getControllerName ()
 
 setControllerActionName ($actionName)
 
 getControllerActionName ()
 
 setArgument ($argumentName, $value)
 
 setControllerVendorName ($vendorName)
 
 getControllerVendorName ()
 
 setArguments (array $arguments)
 
 getArguments ()
 
 getArgument ($argumentName)
 
 hasArgument ($argumentName)
 
 setFormat ($format)
 
 getFormat ()
 
 getOriginalRequest ()
 
 setOriginalRequest (\TYPO3\CMS\Extbase\Mvc\Request $originalRequest)
 
 getOriginalRequestMappingResults ()
 
 setOriginalRequestMappingResults (\TYPO3\CMS\Extbase\Error\Result $originalRequestMappingResults)
 
 getInternalArguments ()
 
 getInternalArgument ($argumentName)
 

Public Attributes

const PATTERN_MATCH_FORMAT = '/^[a-z0-9]{1,5}$/'
 

Protected Attributes

 $controllerObjectNamePattern = 'Tx_@extension_@subpackage_Controller_@controllerController'
 
 $namespacedControllerObjectNamePattern = '@vendor\@extension\@subpackage\Controller\@controllerController'
 
 $pluginName = ''
 
 $controllerExtensionName = null
 
 $controllerVendorName = null
 
 $controllerSubpackageKey = null
 
 $controllerName = 'Standard'
 
 $controllerActionName = 'index'
 
 $arguments = []
 
 $internalArguments = []
 
 $format = 'txt'
 
 $dispatched = false
 
 $originalRequest = null
 
 $originalRequestMappingResults = null
 

Detailed Description

Represents a generic request.

Definition at line 24 of file extbase/Classes/Mvc/Request.php.

Member Function Documentation

getArgument (   $argumentName)

Returns the value of the specified argument

Parameters
string$argumentNameName of the argument
Returns
string Value of the argument
Exceptions
TYPO3 if such an argument does not exist

Implements RequestInterface.

Definition at line 456 of file extbase/Classes/Mvc/Request.php.

getArguments ( )

Returns an array of arguments and their values

Returns
array Associative array of arguments and their values (which may be arguments and values as well)

Implements RequestInterface.

Definition at line 442 of file extbase/Classes/Mvc/Request.php.

References Request\$arguments.

Referenced by FormRuntime\__construct(), and CacheHashEnforcer\enforceForRequest().

getControllerActionName ( )

Returns the name of the action the controller is supposed to execute.

Returns
string Action name

Definition at line 357 of file extbase/Classes/Mvc/Request.php.

References Request\$controllerActionName, and Request\getControllerObjectName().

getControllerExtensionKey ( )

Returns the extension name of the specified controller.

Returns
string The extension key

Definition at line 266 of file extbase/Classes/Mvc/Request.php.

getControllerExtensionName ( )

Returns the extension name of the specified controller.

Returns
string The extension name

Definition at line 255 of file extbase/Classes/Mvc/Request.php.

References Request\$controllerExtensionName.

getControllerName ( )

Returns the object name of the controller supposed to handle this request, if one was set already (if not, the name of the default controller is returned)

Returns
string Object name of the controller

Definition at line 323 of file extbase/Classes/Mvc/Request.php.

References Request\$controllerName.

getControllerObjectName ( )

Returns the object name of the controller defined by the extension name and controller name

Returns
string The controller's Object Name
Exceptions
TYPO3 if the controller does not exist

Implements RequestInterface.

Definition at line 148 of file extbase/Classes/Mvc/Request.php.

Referenced by Request\getControllerActionName().

getControllerSubpackageKey ( )

Returns the subpackage key of the specified controller. If there is no subpackage key set, the method returns NULL

Returns
string The subpackage key

Definition at line 289 of file extbase/Classes/Mvc/Request.php.

References Request\$controllerSubpackageKey.

getControllerVendorName ( )

get the VendorName

Returns
string

Definition at line 415 of file extbase/Classes/Mvc/Request.php.

References Request\$controllerVendorName.

getFormat ( )

Returns the requested representation format

Returns
string The desired format, something like "html", "xml", "png", "json" or the like.

Definition at line 495 of file extbase/Classes/Mvc/Request.php.

References Request\$format.

getInternalArgument (   $argumentName)

Returns the value of the specified argument

Parameters
string$argumentNameName of the argument
Returns
string Value of the argument, or NULL if not set.

Definition at line 559 of file extbase/Classes/Mvc/Request.php.

getInternalArguments ( )

Get the internal arguments of the request, i.e. every argument starting with two underscores.

Returns
array

Definition at line 547 of file extbase/Classes/Mvc/Request.php.

References Request\$internalArguments.

getOriginalRequest ( )

Returns the original request. Filled only if a property mapping error occurred.

Returns
the original request.

Definition at line 505 of file extbase/Classes/Mvc/Request.php.

References Request\$originalRequest.

getOriginalRequestMappingResults ( )

Get the request mapping results for the original request.

Returns

Definition at line 525 of file extbase/Classes/Mvc/Request.php.

References Request\$originalRequestMappingResults.

getPluginName ( )

Returns the plugin key.

Returns
string The plugin key

Definition at line 229 of file extbase/Classes/Mvc/Request.php.

References Request\$pluginName.

hasArgument (   $argumentName)

Checks if an argument of the given name exists (is set)

Parameters
string$argumentNameName of the argument to check
Returns
bool TRUE if the argument is set, otherwise FALSE

Implements RequestInterface.

Definition at line 472 of file extbase/Classes/Mvc/Request.php.

isDispatched ( )

If this request has been dispatched and addressed by the responsible controller and the response is ready to be sent.

The dispatcher will try to dispatch the request again if it has not been addressed yet.

Returns
bool TRUE if this request has been disptached successfully

Implements RequestInterface.

Definition at line 135 of file extbase/Classes/Mvc/Request.php.

References Request\$dispatched.

setArgument (   $argumentName,
  $value 
)

Sets the value of the specified argument

Parameters
string$argumentNameName of the argument to set
mixed$valueThe new value
Exceptions
ExceptionInvalidArgumentNameException
Returns
void

Implements RequestInterface.

Definition at line 384 of file extbase/Classes/Mvc/Request.php.

Referenced by Request\setArguments().

setArguments ( array  $arguments)

Sets the whole arguments array and therefore replaces any arguments which existed before.

Parameters
array$argumentsAn array of argument names and their values
Returns
void

Implements RequestInterface.

Definition at line 428 of file extbase/Classes/Mvc/Request.php.

References Request\setArgument().

setControllerActionName (   $actionName)

Sets the name of the action contained in this request.

Note that the action name must start with a lower case letter and is case sensitive.

Parameters
string$actionNameName of the action to execute by the controller
Returns
void
Exceptions
TYPO3 if the action name is not valid

Definition at line 338 of file extbase/Classes/Mvc/Request.php.

Referenced by ReferringRequest\setArgument().

setControllerExtensionName (   $controllerExtensionName)

Sets the extension name of the controller.

Parameters
string$controllerExtensionNameThe extension name.
Returns
void
Exceptions
TYPO3 if the extension name is not valid

Definition at line 242 of file extbase/Classes/Mvc/Request.php.

References Request\$controllerExtensionName.

Referenced by ReferringRequest\setArgument().

setControllerName (   $controllerName)

Sets the name of the controller which is supposed to handle the request. Note: This is not the object name of the controller!

Parameters
string$controllerNameName of the controller
Exceptions
ExceptionInvalidControllerNameException
Returns
void

Definition at line 303 of file extbase/Classes/Mvc/Request.php.

References Request\$controllerName.

Referenced by ReferringRequest\setArgument().

setControllerObjectName (   $controllerObjectName)

Explicitly sets the object name of the controller

Parameters
string$controllerObjectNameThe fully qualified controller object name
Returns
void

Definition at line 200 of file extbase/Classes/Mvc/Request.php.

References ClassNamingUtility\explodeObjectControllerName().

Referenced by WidgetRequest\setWidgetContext().

setControllerSubpackageKey (   $subpackageKey)

Sets the subpackage key of the controller.

Parameters
string$subpackageKeyThe subpackage key.
Returns
void

Definition at line 278 of file extbase/Classes/Mvc/Request.php.

Referenced by ReferringRequest\setArgument().

setControllerVendorName (   $vendorName)

sets the VendorName

Parameters
string$vendorName
Returns
void

Definition at line 405 of file extbase/Classes/Mvc/Request.php.

Referenced by ReferringRequest\setArgument().

setDispatched (   $flag)

Sets the dispatched flag

Parameters
bool$flagIf this request has been dispatched
Returns
void

Implements RequestInterface.

Definition at line 120 of file extbase/Classes/Mvc/Request.php.

setFormat (   $format)

Sets the requested representation format

Parameters
string$formatThe desired format, something like "html", "xml", "png", "json" or the like. Can even be something like "rss.xml".
Returns
void

Definition at line 484 of file extbase/Classes/Mvc/Request.php.

References Request\$format.

Referenced by ReferringRequest\setArgument().

setOriginalRequest ( \TYPO3\CMS\Extbase\Mvc\Request  $originalRequest)
Parameters
\TYPO3\CMS\Extbase\Mvc\Request$originalRequest
Returns
void

Definition at line 515 of file extbase/Classes/Mvc/Request.php.

References Request\$originalRequest.

setOriginalRequestMappingResults ( \TYPO3\CMS\Extbase\Error\Result  $originalRequestMappingResults)
Parameters
\TYPO3\CMS\Extbase\Error\Result$originalRequestMappingResults

Definition at line 536 of file extbase/Classes/Mvc/Request.php.

References Request\$originalRequestMappingResults.

setPluginName (   $pluginName = null)

Sets the plugin name.

Parameters
string | NULL$pluginName
Returns
void

Definition at line 216 of file extbase/Classes/Mvc/Request.php.

References Request\$pluginName.

Member Data Documentation

$arguments = []
protected
$controllerActionName = 'index'
protected

Definition at line 72 of file extbase/Classes/Mvc/Request.php.

Referenced by Request\getControllerActionName().

$controllerExtensionName = null
protected
$controllerName = 'Standard'
protected
$controllerObjectNamePattern = 'Tx_@extension_@subpackage_Controller_@controllerController'
protected

Definition at line 33 of file extbase/Classes/Mvc/Request.php.

$controllerSubpackageKey = null
protected

Definition at line 62 of file extbase/Classes/Mvc/Request.php.

Referenced by Request\getControllerSubpackageKey().

$controllerVendorName = null
protected

Definition at line 55 of file extbase/Classes/Mvc/Request.php.

Referenced by Request\getControllerVendorName().

$dispatched = false
protected

Definition at line 97 of file extbase/Classes/Mvc/Request.php.

Referenced by Request\isDispatched().

$format = 'txt'
protected

Definition at line 92 of file extbase/Classes/Mvc/Request.php.

Referenced by Request\getFormat(), and Request\setFormat().

$internalArguments = []
protected

Definition at line 87 of file extbase/Classes/Mvc/Request.php.

Referenced by Request\getInternalArguments().

$namespacedControllerObjectNamePattern = '@vendor\@extension\@subpackage\Controller\@controllerController'
protected

Definition at line 40 of file extbase/Classes/Mvc/Request.php.

$originalRequest = null
protected
$originalRequestMappingResults = null
protected
$pluginName = ''
protected

Definition at line 45 of file extbase/Classes/Mvc/Request.php.

Referenced by Request\getPluginName(), and Request\setPluginName().

const PATTERN_MATCH_FORMAT = '/^[a-z0-9]{1,5}$/'

Definition at line 26 of file extbase/Classes/Mvc/Request.php.