ExtbaseRequestParameters

class \TYPO3\CMS\Extbase\Mvc\ExtbaseRequestParameters

Extbase request related state.

Attached as 'extbase' attribute to PSR-7 ServerRequestInterface.

Table of Contents

Properties

$arguments  : array
$controllerActionName  : string
$controllerAliasToClassNameMapping  : array
$controllerExtensionName  : string
$controllerName  : string
$controllerObjectName  : string
$dispatched  : bool
$format  : string
$internalArguments  : array
Framework-internal arguments for this request, such as __referrer.
$originalRequest  : Request|null
If this request is a forward because of an error, the original request gets filled.
$originalRequestMappingResults  : Result|null
If the request is a forward because of an error, these mapping results get filled here.
$pluginName  : string

Methods

__construct()  : mixed
getArgument()  : string|array
Returns the value of the specified argument
getArguments()  : array
Returns an array of arguments and their values
getControllerActionName()  : string
Returns the name of the action the controller is supposed to execute.
getControllerExtensionKey()  : string
Returns the extension name of the specified controller.
getControllerExtensionName()  : string
Returns the extension name of the specified controller.
getControllerName()  : string
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)
getControllerObjectName()  : string
getFormat()  : string
Returns the requested representation format
getInternalArgument()  : string|null
Returns the value of the specified argument
getInternalArguments()  : array
Get the internal arguments of the request, i.e. every argument starting with two underscores.
getOriginalRequest()  : Request|null
Returns the original request. Filled only if a property mapping error occurred.
getOriginalRequestMappingResults()  : Result
Get the request mapping results for the original request.
getPluginName()  : string
Returns the plugin key.
hasArgument()  : bool
Checks if an argument of the given name exists (is set)
isDispatched()  : bool
If this request has been dispatched and addressed by the responsible controller and the response is ready to be sent.
setArgument()  : self
Sets the value of the specified argument
setArguments()  : self
Sets the whole arguments array and therefore replaces any arguments which existed before.
setControllerActionName()  : self
Sets the name of the action contained in this request.
setControllerAliasToClassNameMapping()  : mixed
setControllerExtensionName()  : self
Sets the extension name of the controller.
setControllerName()  : self
Sets the name of the controller which is supposed to handle the request.
setControllerObjectName()  : mixed
Explicitly sets the object name of the controller
setDispatched()  : mixed
Sets the dispatched flag
setFormat()  : self
Sets the requested representation format
setOriginalRequest()  : mixed
setOriginalRequestMappingResults()  : mixed
setPluginName()  : mixed
Sets the plugin name.

Properties

$arguments

protected array $arguments = []

The arguments for this request

$controllerActionName

protected string $controllerActionName = 'index'

Name of the action the controller is supposed to take.

$controllerAliasToClassNameMapping

protected array $controllerAliasToClassNameMapping = []

$controllerExtensionName

protected string $controllerExtensionName

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

Tags

todo:

Should probably at least init to empty string.

$controllerName

protected string $controllerName = 'Standard'

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

$controllerObjectName

protected string $controllerObjectName

Tags

todo:

Should probably at least init to empty string.

$dispatched

Deprecated

since v11, will be removed in v12.

protected bool $dispatched = false

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

$format

protected string $format = 'html'

The requested representation format

$internalArguments

Framework-internal arguments for this request, such as __referrer.

protected array $internalArguments = []

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

$originalRequest

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

protected Request|null $originalRequest

$originalRequestMappingResults

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

protected Result|null $originalRequestMappingResults

$pluginName

protected string $pluginName = ''

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

Methods

__construct()

public __construct([string $controllerClassName = '' ]) : mixed

Parameters

$controllerClassName : string = ''

getArgument()

Returns the value of the specified argument

public getArgument(string $argumentName) : string|array

Parameters

$argumentName : string

Name of the argument

Tags

throws
NoSuchArgumentException

if such an argument does not exist

Return values

string|array —

Value of the argument

getArguments()

Returns an array of arguments and their values

public getArguments() : array

Return values

array —

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

getControllerActionName()

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

public getControllerActionName() : string

Return values

string —

Action name

getControllerExtensionKey()

Returns the extension name of the specified controller.

public getControllerExtensionKey() : string

Return values

string —

The extension key

getControllerExtensionName()

Returns the extension name of the specified controller.

public getControllerExtensionName() : string

Return values

string —

The extension name

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)

public getControllerName() : string

Return values

string —

Object name of the controller

getControllerObjectName()

public getControllerObjectName() : string

Return values

string

getFormat()

Returns the requested representation format

public getFormat() : string

Return values

string —

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

getInternalArgument()

Returns the value of the specified argument

public getInternalArgument(string $argumentName) : string|null

Parameters

$argumentName : string

Name of the argument

Return values

string|null —

Value of the argument, or NULL if not set.

getInternalArguments()

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

public getInternalArguments() : array

Return values

array

getOriginalRequest()

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

public getOriginalRequest() : Request|null

Return values

Request|null —

the original request.

getOriginalRequestMappingResults()

Get the request mapping results for the original request.

public getOriginalRequestMappingResults() : Result

Return values

Result

getPluginName()

Returns the plugin key.

public getPluginName() : string

Return values

string —

The plugin key

hasArgument()

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

public hasArgument(string $argumentName) : bool

Parameters

$argumentName : string

Name of the argument to check

Return values

bool —

TRUE if the argument is set, otherwise FALSE

isDispatched()

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

public isDispatched() : bool

Deprecated

since v11, will be removed in v12.

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

Return values

bool —

TRUE if this request has been dispatched successfully

setArgument()

Sets the value of the specified argument

public setArgument(string $argumentName, mixed $value) : self

Parameters

$argumentName : string

Name of the argument to set

$value : mixed

The new value

Tags

throws
InvalidArgumentNameException

Return values

self

setArguments()

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

public setArguments(array $arguments) : self

Parameters

$arguments : array

An array of argument names and their values

Return values

self

setControllerActionName()

Sets the name of the action contained in this request.

public setControllerActionName(string $actionName) : self

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

Parameters

$actionName : string

Name of the action to execute by the controller

Tags

throws
InvalidActionNameException

if the action name is not valid

Return values

self

setControllerAliasToClassNameMapping()

public setControllerAliasToClassNameMapping(array $controllerAliasToClassNameMapping) : mixed

Parameters

$controllerAliasToClassNameMapping : array

setControllerExtensionName()

Sets the extension name of the controller.

public setControllerExtensionName(string $controllerExtensionName) : self

Parameters

$controllerExtensionName : string

The extension name.

Tags

throws
InvalidExtensionNameException

if the extension name is not valid

Return values

self

setControllerName()

Sets the name of the controller which is supposed to handle the request.

public setControllerName(string $controllerName) : self

Note: This is not the object name of the controller!

Parameters

$controllerName : string

Name of the controller

Tags

throws
InvalidControllerNameException

Return values

self

setControllerObjectName()

Explicitly sets the object name of the controller

public setControllerObjectName(string $controllerObjectName) : mixed

Parameters

$controllerObjectName : string

The fully qualified controller object name

setDispatched()

Sets the dispatched flag

public setDispatched(bool $flag) : mixed

Deprecated

since v11, will be removed in v12.

Parameters

$flag : bool

If this request has been dispatched

setFormat()

Sets the requested representation format

public setFormat(string $format) : self

Parameters

$format : string

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

Return values

self

setOriginalRequest()

public setOriginalRequest(Request $originalRequest) : mixed

Parameters

$originalRequest : Request

setOriginalRequestMappingResults()

public setOriginalRequestMappingResults(Result $originalRequestMappingResults) : mixed

Parameters

$originalRequestMappingResults : Result

setPluginName()

Sets the plugin name.

public setPluginName([string|null $pluginName = null ]) : mixed

Parameters

$pluginName : string|null = null
On this page