ExtbaseRequestParameters

Extbase request related state.

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

Internal

Set up extbase internally, use TYPO3\CMS\Extbase\Mvc\Request instead.

Table of Contents

Properties

$arguments  : array<string|int, mixed>
$controllerActionName  : string
$controllerAliasToClassNameMapping  : array<string|int, mixed>
$controllerExtensionName  : string
$controllerName  : string
$controllerObjectName  : string
$dispatched  : bool
$format  : string
$internalArguments  : array<string|int, mixed>
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<string|int, mixed>
Returns the value of the specified argument
getArguments()  : array<string|int, mixed>
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<string|int, mixed>
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<string|int, mixed> $arguments = []

The arguments for this request

$controllerActionName

protected string $controllerActionName = 'index'

Name of the action the controller is supposed to take.

$controllerAliasToClassNameMapping

protected array<string|int, mixed> $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<string|int, mixed> $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<string|int, mixed>
Parameters
$argumentName : string

Name of the argument

Tags
throws
NoSuchArgumentException

if such an argument does not exist

Return values
string|array<string|int, mixed>

Value of the argument

getArguments()

Returns an array of arguments and their values

public getArguments() : array<string|int, mixed>
Return values
array<string|int, mixed>

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

Internal

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

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<string|int, mixed>
Internal

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

Return values
array<string|int, mixed>

getOriginalRequest()

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

public getOriginalRequest() : Request|null
Internal

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

Return values
Request|null

the original request.

getOriginalRequestMappingResults()

Get the request mapping results for the original request.

public getOriginalRequestMappingResults() : Result
Internal

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

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

Internal

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

Tags
throws
InvalidArgumentNameException
Return values
self

setArguments()

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

public setArguments(array<string|int, mixed> $arguments) : self
Parameters
$arguments : array<string|int, mixed>

An array of argument names and their values

Internal

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

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

Internal

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

Tags
throws
InvalidActionNameException

if the action name is not valid

Return values
self

setControllerAliasToClassNameMapping()

public setControllerAliasToClassNameMapping(array<string|int, mixed> $controllerAliasToClassNameMapping) : mixed
Parameters
$controllerAliasToClassNameMapping : array<string|int, mixed>

setControllerExtensionName()

Sets the extension name of the controller.

public setControllerExtensionName(string $controllerExtensionName) : self
Parameters
$controllerExtensionName : string

The extension name.

Internal

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

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

Internal

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

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

Internal

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

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".

Internal

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

Return values
self

setOriginalRequest()

public setOriginalRequest(Request $originalRequest) : mixed
Parameters
$originalRequest : Request
Internal

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

setOriginalRequestMappingResults()

public setOriginalRequestMappingResults(Result $originalRequestMappingResults) : mixed
Parameters
$originalRequestMappingResults : Result
Internal

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

setPluginName()

Sets the plugin name.

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

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


        
On this page

Search results