‪TYPO3CMS  9.5
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\Extbase\Mvc\Web\ReferringRequest TYPO3\CMS\Fluid\Core\Widget\WidgetRequest

Public Member Functions

 setDispatched ($flag)
 
bool isDispatched ()
 
string getControllerObjectName ()
 
 setControllerObjectName ($controllerObjectName)
 
 setPluginName ($pluginName=null)
 
string getPluginName ()
 
 setControllerExtensionName ($controllerExtensionName)
 
string getControllerExtensionName ()
 
string getControllerExtensionKey ()
 
 setControllerSubpackageKey ($subpackageKey)
 
string getControllerSubpackageKey ()
 
 setControllerName ($controllerName)
 
string getControllerName ()
 
 setControllerActionName ($actionName)
 
string getControllerActionName ()
 
 setArgument ($argumentName, $value)
 
 setControllerVendorName ($vendorName)
 
string getControllerVendorName ()
 
 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 (\TYPO3\CMS\Extbase\Error\Result $originalRequestMappingResults)
 
array getInternalArguments ()
 
string getInternalArgument ($argumentName)
 

Public Attributes

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

Protected Attributes

string $namespacedControllerObjectNamePattern = '@vendor\@extension\@subpackage\Controller\@controllerController'
 
string $pluginName = ''
 
string $controllerExtensionName
 
string $controllerVendorName
 
string $controllerSubpackageKey
 
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
 

Detailed Description

Represents a generic request.

Definition at line 22 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 395 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 382 of file Request.php.

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

Referenced by TYPO3\CMS\Form\Domain\Runtime\FormRuntime\__construct(), and TYPO3\CMS\Extbase\Mvc\Web\CacheHashEnforcer\enforceForRequest().

◆ 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 300 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Request\$controllerActionName, 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 216 of file Request.php.

◆ getControllerExtensionName()

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

Returns the extension name of the specified controller.

Returns
‪string The extension name

Definition at line 206 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 268 of file Request.php.

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

◆ getControllerObjectName()

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

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

Returns
‪string The controller's Object Name
Exceptions

Implements TYPO3\CMS\Extbase\Mvc\RequestInterface.

Definition at line 122 of file Request.php.

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

◆ 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 239 of file Request.php.

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

◆ getControllerVendorName()

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

get the VendorName

Returns
‪string

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

Definition at line 357 of file Request.php.

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

◆ 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 431 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 498 of file Request.php.

◆ 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 486 of file Request.php.

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

◆ 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 442 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 462 of file Request.php.

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

◆ getPluginName()

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

Returns the plugin key.

Returns
‪string The plugin key

Definition at line 182 of file Request.php.

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

◆ 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 410 of file Request.php.

◆ 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 disptached successfully

Implements TYPO3\CMS\Extbase\Mvc\RequestInterface.

Definition at line 110 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 326 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 369 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().

◆ 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 282 of file Request.php.

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

◆ setControllerExtensionName()

TYPO3\CMS\Extbase\Mvc\Request::setControllerExtensionName (   $controllerExtensionName)

Sets the extension name of the controller.

Parameters
string$controllerExtensionName‪The extension name.
Exceptions

Definition at line 194 of file Request.php.

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

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

◆ 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 252 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\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 227 of file Request.php.

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

◆ setControllerVendorName()

TYPO3\CMS\Extbase\Mvc\Request::setControllerVendorName (   $vendorName)

sets the VendorName

Parameters
string$vendorName

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

Definition at line 346 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 96 of file Request.php.

◆ 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 421 of file Request.php.

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

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

◆ 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 451 of file Request.php.

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

◆ setOriginalRequestMappingResults()

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

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

Definition at line 474 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 170 of file Request.php.

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

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

Member Data Documentation

◆ $arguments

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

◆ $controllerActionName

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

Name of the action the controller is supposed to take.

Definition at line 56 of file Request.php.

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

◆ $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 38 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 52 of file Request.php.

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

◆ $controllerSubpackageKey

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

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

Definition at line 48 of file Request.php.

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

◆ $controllerVendorName

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

vendor prefix

Definition at line 42 of file Request.php.

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

◆ $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 77 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 73 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 69 of file Request.php.

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

◆ $namespacedControllerObjectNamePattern

string TYPO3\CMS\Extbase\Mvc\Request::$namespacedControllerObjectNamePattern = '@vendor\@extension\@subpackage\Controller\@controllerController'
protected

Pattern after which the namespaced controller object name is built

Definition at line 30 of file Request.php.

◆ $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 83 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 89 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 34 of file Request.php.

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

◆ PATTERN_MATCH_FORMAT

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

Definition at line 24 of file Request.php.