‪TYPO3CMS  10.4
TYPO3\CMS\Extbase\Mvc\Request Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Mvc\Request:
TYPO3\CMS\Extbase\Mvc\RequestInterface TYPO3\CMS\Extbase\Mvc\Web\Request TYPO3\CMS\Fluid\Core\Widget\WidgetRequest TYPO3\CMS\Extbase\Mvc\Web\ReferringRequest

Public Member Functions

 setDispatched ($flag)
 
bool isDispatched ()
 
 __construct (string $controllerClassName='')
 
string getControllerObjectName ()
 
 setControllerObjectName ($controllerObjectName)
 
 setPluginName ($pluginName=null)
 
string getPluginName ()
 
 setControllerExtensionName ($controllerExtensionName)
 
string getControllerExtensionName ()
 
string getControllerExtensionKey ()
 
 setControllerSubpackageKey ($subpackageKey)
 
string getControllerSubpackageKey ()
 
 setControllerAliasToClassNameMapping (array $controllerAliasToClassNameMapping)
 
 setControllerName ($controllerName)
 
string getControllerName ()
 
 setControllerActionName ($actionName)
 
string getControllerActionName ()
 
 setArgument ($argumentName, $value)
 
 setArguments (array $arguments)
 
array getArguments ()
 
string array getArgument ($argumentName)
 
bool hasArgument ($argumentName)
 
 setFormat ($format)
 
string getFormat ()
 
TYPO3 CMS Extbase Mvc Request getOriginalRequest ()
 
 setOriginalRequest (\TYPO3\CMS\Extbase\Mvc\Request $originalRequest)
 
TYPO3 CMS Extbase Error Result getOriginalRequestMappingResults ()
 
 setOriginalRequestMappingResults (Result $originalRequestMappingResults)
 
array getInternalArguments ()
 
string getInternalArgument ($argumentName)
 
 setMethod ($method)
 
string getMethod ()
 
 setRequestUri ($requestUri)
 
string getRequestUri ()
 
 setBaseUri ($baseUri)
 
string getBaseUri ()
 
 setIsCached ($isCached)
 
bool isCached ()
 

Public Attributes

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

Protected Attributes

string $pluginName = ''
 
string $controllerExtensionName
 
string $controllerSubpackageKey
 
string $controllerObjectName
 
string $controllerName = 'Standard'
 
string $controllerActionName = 'index'
 
array $arguments = array( )
 
array $internalArguments = array( )
 
string $format = 'txt'
 
bool $dispatched = false
 
TYPO3 CMS Extbase Mvc Request $originalRequest
 
TYPO3 CMS Extbase Error Result $originalRequestMappingResults
 
string $method = 'GET'
 
string $requestUri
 
string $baseUri
 
bool $isCached = false
 
array $controllerAliasToClassNameMapping = array( )
 

Detailed Description

Represents a generic request.

Definition at line 30 of file Request.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Extbase\Mvc\Request::__construct ( string  $controllerClassName = '')
Parameters
string$controllerClassName

Definition at line 136 of file Request.php.

Member Function Documentation

◆ getArgument()

string array TYPO3\CMS\Extbase\Mvc\Request::getArgument (   $argumentName)

Returns the value of the specified argument

Parameters
string$argumentName‪Name of the argument
Returns
‪string|array Value of the argument
Exceptions

Implements TYPO3\CMS\Extbase\Mvc\RequestInterface.

Definition at line 391 of file Request.php.

◆ getArguments()

array TYPO3\CMS\Extbase\Mvc\Request::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 TYPO3\CMS\Extbase\Mvc\RequestInterface.

Definition at line 378 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Request\$arguments.

Referenced by TYPO3\CMS\Form\Domain\Runtime\FormRuntime\__construct(), and TYPO3\CMS\IndexedSearch\Controller\AdministrationController\processRequest().

◆ getBaseUri()

string TYPO3\CMS\Extbase\Mvc\Request::getBaseUri ( )

Returns the base URI

Returns
‪string Base URI of this web request

Definition at line 564 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Request\$baseUri.

◆ getControllerActionName()

string TYPO3\CMS\Extbase\Mvc\Request::getControllerActionName ( )

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

Returns
‪string Action name

Definition at line 315 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Request\$controllerActionName, TYPO3\CMS\Extbase\Mvc\Request\$controllerObjectName, and TYPO3\CMS\Extbase\Mvc\Request\getControllerObjectName().

◆ getControllerExtensionKey()

string TYPO3\CMS\Extbase\Mvc\Request::getControllerExtensionKey ( )

Returns the extension name of the specified controller.

Returns
‪string The extension key

Definition at line 215 of file Request.php.

References TYPO3\CMS\Core\Utility\GeneralUtility\camelCaseToLowerCaseUnderscored().

◆ getControllerExtensionName()

string TYPO3\CMS\Extbase\Mvc\Request::getControllerExtensionName ( )

Returns the extension name of the specified controller.

Returns
‪string The extension name

Definition at line 205 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Request\$controllerExtensionName.

◆ getControllerName()

string TYPO3\CMS\Extbase\Mvc\Request::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 283 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Request\$controllerName.

◆ getControllerObjectName()

string TYPO3\CMS\Extbase\Mvc\Request::getControllerObjectName ( )

◆ getControllerSubpackageKey()

string TYPO3\CMS\Extbase\Mvc\Request::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

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 238 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Request\$controllerSubpackageKey.

◆ getFormat()

string TYPO3\CMS\Extbase\Mvc\Request::getFormat ( )

Returns the requested representation format

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

Definition at line 427 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Request\$format.

◆ getInternalArgument()

string TYPO3\CMS\Extbase\Mvc\Request::getInternalArgument (   $argumentName)

Returns the value of the specified argument

Parameters
string$argumentName‪Name of the argument
Returns
‪string Value of the argument, or NULL if not set.

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 494 of file Request.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfigurationService\initializePropertyMappingConfigurationFromRequest().

◆ getInternalArguments()

array TYPO3\CMS\Extbase\Mvc\Request::getInternalArguments ( )

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

Returns
‪array

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 482 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Request\$internalArguments.

◆ getMethod()

string TYPO3\CMS\Extbase\Mvc\Request::getMethod ( )

Returns the name of the request method

Returns
‪string Name of the request method

Definition at line 522 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Request\$method.

Referenced by TYPO3\CMS\Form\Domain\Runtime\FormRuntime\isPostRequest().

◆ getOriginalRequest()

TYPO3 CMS Extbase Mvc Request TYPO3\CMS\Extbase\Mvc\Request::getOriginalRequest ( )

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

Returns
‪\TYPO3\CMS\Extbase\Mvc\Request the original request.

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 438 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Request\$originalRequest.

◆ getOriginalRequestMappingResults()

TYPO3 CMS Extbase Error Result TYPO3\CMS\Extbase\Mvc\Request::getOriginalRequestMappingResults ( )

Get the request mapping results for the original request.

Returns
‪\TYPO3\CMS\Extbase\Error\Result

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 458 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Request\$originalRequestMappingResults.

◆ getPluginName()

string TYPO3\CMS\Extbase\Mvc\Request::getPluginName ( )

◆ getRequestUri()

string TYPO3\CMS\Extbase\Mvc\Request::getRequestUri ( )

Returns the request URI

Returns
‪string URI of this web request

Definition at line 543 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Request\$requestUri.

◆ hasArgument()

bool TYPO3\CMS\Extbase\Mvc\Request::hasArgument (   $argumentName)

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

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

Implements TYPO3\CMS\Extbase\Mvc\RequestInterface.

Definition at line 406 of file Request.php.

◆ isCached()

bool TYPO3\CMS\Extbase\Mvc\Request::isCached ( )

Return whether the current request is a cached request or not.

Returns
‪bool the caching status.

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 586 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Request\$isCached.

Referenced by TYPO3\CMS\Extbase\Mvc\Request\setIsCached().

◆ isDispatched()

bool TYPO3\CMS\Extbase\Mvc\Request::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 dispatched successfully

Implements TYPO3\CMS\Extbase\Mvc\RequestInterface.

Definition at line 128 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Request\$dispatched.

◆ setArgument()

TYPO3\CMS\Extbase\Mvc\Request::setArgument (   $argumentName,
  $value 
)

Sets the value of the specified argument

Parameters
string$argumentName‪Name of the argument to set
mixed$value‪The new value
Exceptions
Exception

Implements TYPO3\CMS\Extbase\Mvc\RequestInterface.

Reimplemented in TYPO3\CMS\Extbase\Mvc\Web\ReferringRequest.

Definition at line 344 of file Request.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Request\setArguments().

◆ setArguments()

TYPO3\CMS\Extbase\Mvc\Request::setArguments ( array  $arguments)

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

Parameters
array$arguments‪An array of argument names and their values

only to be used within Extbase, not part of TYPO3 Core API.

Implements TYPO3\CMS\Extbase\Mvc\RequestInterface.

Definition at line 365 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Request\$arguments, and TYPO3\CMS\Extbase\Mvc\Request\setArgument().

Referenced by TYPO3\CMS\Form\Domain\Runtime\FormRuntime\__construct(), TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetViewHelper\passArgumentsToSubRequest(), and TYPO3\CMS\IndexedSearch\Controller\AdministrationController\processRequest().

◆ setBaseUri()

TYPO3\CMS\Extbase\Mvc\Request::setBaseUri (   $baseUri)

Sets the base URI for this request.

Parameters
string$baseUri‪New base URI

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 554 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Request\$baseUri.

◆ setControllerActionName()

TYPO3\CMS\Extbase\Mvc\Request::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$actionName‪Name of the action to execute by the controller
Exceptions

Definition at line 297 of file Request.php.

Referenced by TYPO3\CMS\Fluid\Core\Widget\AbstractWidgetViewHelper\passArgumentsToSubRequest(), TYPO3\CMS\IndexedSearch\Controller\AdministrationController\processRequest(), and TYPO3\CMS\Extbase\Mvc\Web\ReferringRequest\setArgument().

◆ setControllerAliasToClassNameMapping()

TYPO3\CMS\Extbase\Mvc\Request::setControllerAliasToClassNameMapping ( array  $controllerAliasToClassNameMapping)
Parameters
array$controllerAliasToClassNameMapping

Definition at line 250 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Request\$controllerAliasToClassNameMapping.

◆ setControllerExtensionName()

◆ setControllerName()

TYPO3\CMS\Extbase\Mvc\Request::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$controllerName‪Name of the controller
Exceptions
Exception

Definition at line 265 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Request\$controllerName.

Referenced by TYPO3\CMS\Extbase\Mvc\Web\ReferringRequest\setArgument().

◆ setControllerObjectName()

TYPO3\CMS\Extbase\Mvc\Request::setControllerObjectName (   $controllerObjectName)

Explicitly sets the object name of the controller

Parameters
string$controllerObjectName‪The fully qualified controller object name

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 155 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Request\$controllerObjectName, and TYPO3\CMS\Core\Utility\ClassNamingUtility\explodeObjectControllerName().

Referenced by TYPO3\CMS\Fluid\Core\Widget\WidgetRequest\setWidgetContext().

◆ setControllerSubpackageKey()

TYPO3\CMS\Extbase\Mvc\Request::setControllerSubpackageKey (   $subpackageKey)

Sets the subpackage key of the controller.

Parameters
string$subpackageKey‪The subpackage key.

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 226 of file Request.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Web\ReferringRequest\setArgument().

◆ setDispatched()

TYPO3\CMS\Extbase\Mvc\Request::setDispatched (   $flag)

Sets the dispatched flag

Parameters
bool$flag‪If this request has been dispatched

Implements TYPO3\CMS\Extbase\Mvc\RequestInterface.

Definition at line 114 of file Request.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Controller\ActionController\processRequest().

◆ setFormat()

TYPO3\CMS\Extbase\Mvc\Request::setFormat (   $format)

Sets the requested representation format

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

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 417 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Request\$format.

Referenced by TYPO3\CMS\Extbase\Mvc\Web\ReferringRequest\setArgument().

◆ setIsCached()

TYPO3\CMS\Extbase\Mvc\Request::setIsCached (   $isCached)

Set if the current request is cached.

Parameters
bool$isCached

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 575 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Request\$isCached, and TYPO3\CMS\Extbase\Mvc\Request\isCached().

◆ setMethod()

TYPO3\CMS\Extbase\Mvc\Request::setMethod (   $method)

Sets the request method

Parameters
string$method‪Name of the request method
Exceptions

Definition at line 509 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Request\$method.

◆ setOriginalRequest()

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

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 447 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Request\$originalRequest.

Referenced by TYPO3\CMS\Extbase\Mvc\Controller\ActionController\forwardToReferringRequest().

◆ setOriginalRequestMappingResults()

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

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 470 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Request\$originalRequestMappingResults.

◆ setPluginName()

TYPO3\CMS\Extbase\Mvc\Request::setPluginName (   $pluginName = null)

Sets the plugin name.

Parameters
string | null$pluginName

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 169 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Request\$pluginName.

Referenced by TYPO3\CMS\Extbase\Tests\Functional\Mvc\Controller\ActionControllerArgumentTest\buildRequest().

◆ setRequestUri()

TYPO3\CMS\Extbase\Mvc\Request::setRequestUri (   $requestUri)

Sets the request URI

Parameters
string$requestUri‪URI of this web request

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 533 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Request\$requestUri.

Member Data Documentation

◆ $arguments

array TYPO3\CMS\Extbase\Mvc\Request::$arguments = array( )
protected

The arguments for this request

Definition at line 62 of file Request.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Request\getArguments(), and TYPO3\CMS\Extbase\Mvc\Request\setArguments().

◆ $baseUri

string TYPO3\CMS\Extbase\Mvc\Request::$baseUri
protected

The base URI for this request - ie. the host and path leading to the index.php

Definition at line 103 of file Request.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Request\getBaseUri(), and TYPO3\CMS\Extbase\Mvc\Request\setBaseUri().

◆ $controllerActionName

string TYPO3\CMS\Extbase\Mvc\Request::$controllerActionName = 'index'
protected

Name of the action the controller is supposed to take.

Definition at line 58 of file Request.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Request\getControllerActionName().

◆ $controllerAliasToClassNameMapping

array TYPO3\CMS\Extbase\Mvc\Request::$controllerAliasToClassNameMapping = array( )
protected

◆ $controllerExtensionName

string TYPO3\CMS\Extbase\Mvc\Request::$controllerExtensionName
protected

Name of the extension which is supposed to handle this request. This is the extension name converted to UpperCamelCase

Definition at line 40 of file Request.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Request\getControllerExtensionName(), and TYPO3\CMS\Extbase\Mvc\Request\setControllerExtensionName().

◆ $controllerName

string TYPO3\CMS\Extbase\Mvc\Request::$controllerName = 'Standard'
protected

Object name of the controller which is supposed to handle this request.

Definition at line 54 of file Request.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Request\getControllerName(), and TYPO3\CMS\Extbase\Mvc\Request\setControllerName().

◆ $controllerObjectName

string TYPO3\CMS\Extbase\Mvc\Request::$controllerObjectName
protected

◆ $controllerSubpackageKey

string TYPO3\CMS\Extbase\Mvc\Request::$controllerSubpackageKey
protected

Subpackage key of the controller which is supposed to handle this request.

Definition at line 46 of file Request.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Request\getControllerSubpackageKey().

◆ $dispatched

bool TYPO3\CMS\Extbase\Mvc\Request::$dispatched = false
protected

If this request has been changed and needs to be dispatched again

Definition at line 79 of file Request.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Request\isDispatched().

◆ $format

string TYPO3\CMS\Extbase\Mvc\Request::$format = 'txt'
protected

The requested representation format

Definition at line 75 of file Request.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Request\getFormat(), and TYPO3\CMS\Extbase\Mvc\Request\setFormat().

◆ $internalArguments

array TYPO3\CMS\Extbase\Mvc\Request::$internalArguments = array( )
protected

Framework-internal arguments for this request, such as __referrer. All framework-internal arguments start with double underscore (__), and are only used from within the framework. Not for user consumption. Internal Arguments can be objects, in contrast to public arguments

Definition at line 71 of file Request.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Request\getInternalArguments().

◆ $isCached

bool TYPO3\CMS\Extbase\Mvc\Request::$isCached = false
protected

TRUE if the current request is cached, false otherwise.

Definition at line 107 of file Request.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Request\isCached(), and TYPO3\CMS\Extbase\Mvc\Request\setIsCached().

◆ $method

string TYPO3\CMS\Extbase\Mvc\Request::$method = 'GET'
protected

Contains the request method

Definition at line 95 of file Request.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Request\getMethod(), and TYPO3\CMS\Extbase\Mvc\Request\setMethod().

◆ $originalRequest

TYPO3 CMS Extbase Mvc Request TYPO3\CMS\Extbase\Mvc\Request::$originalRequest
protected

If this request is a forward because of an error, the original request gets filled.

Definition at line 85 of file Request.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Request\getOriginalRequest(), and TYPO3\CMS\Extbase\Mvc\Request\setOriginalRequest().

◆ $originalRequestMappingResults

TYPO3 CMS Extbase Error Result TYPO3\CMS\Extbase\Mvc\Request::$originalRequestMappingResults
protected

If the request is a forward because of an error, these mapping results get filled here.

Definition at line 91 of file Request.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Request\getOriginalRequestMappingResults(), and TYPO3\CMS\Extbase\Mvc\Request\setOriginalRequestMappingResults().

◆ $pluginName

string TYPO3\CMS\Extbase\Mvc\Request::$pluginName = ''
protected

Key of the plugin which identifies the plugin. It must be a string containing [a-z0-9]

Definition at line 36 of file Request.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Request\getPluginName(), and TYPO3\CMS\Extbase\Mvc\Request\setPluginName().

◆ $requestUri

string TYPO3\CMS\Extbase\Mvc\Request::$requestUri
protected

◆ PATTERN_MATCH_FORMAT

const TYPO3\CMS\Extbase\Mvc\Request::PATTERN_MATCH_FORMAT = '/^[a-z0-9]{1,5}$/'

Definition at line 32 of file Request.php.