Request implements ServerRequestInterface, RequestInterface

The extbase request.

This is a decorator: The core PSR-7 request is hand over as constructor argument, this class implements ServerRequestInterface, too. Additionally, the extbase request details are attached as 'extbase' attribute to the PSR-7 request and this class implements extbase RequestInterface. This class has no state except the PSR-7 request, all operations are hand down to the PSR-7 request.

Table of Contents

Interfaces

ServerRequestInterface
RequestInterface
Contract for an extbase request.

Properties

$request  : ServerRequestInterface

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 extbase arguments and their values.
getAttribute()  : mixed
getAttributes()  : array<string|int, mixed>
getBaseUri()  : mixed
getBody()  : StreamInterface
getControllerActionName()  : mixed
Returns the name of the action the controller is supposed to execute.
getControllerExtensionKey()  : string
Returns the extension key of the specified controller.
getControllerExtensionName()  : mixed
Returns the extension name of the specified controller.
getControllerName()  : mixed
Returns the controller name supposed to handle this request, if one was set already (if not, the name of the default controller is returned)
getControllerObjectName()  : string
Returns the object name of the controller defined by the package key and controller name.
getCookieParams()  : array<string|int, mixed>
getFormat()  : string
Returns the requested representation format, something like "html", "xml", "png", "json" or the like.
getHeader()  : array<string|int, mixed>
getHeaderLine()  : string
getHeaders()  : array<string|int, mixed>
getInternalArgument()  : mixed
getInternalArguments()  : array<string|int, mixed>
getMethod()  : string
getOriginalRequest()  : Request|null
getOriginalRequestMappingResults()  : Result
Get the request mapping results for the original request.
getParsedBody()  : mixed
getPluginName()  : mixed
Returns the plugin key.
getProtocolVersion()  : string
getQueryParams()  : array<string|int, mixed>
getRequestTarget()  : string
getRequestUri()  : mixed
getServerParams()  : array<string|int, mixed>
getUploadedFiles()  : array<string|int, mixed>
getUri()  : UriInterface
hasArgument()  : bool
Checks if an argument of the given name exists (is set).
hasHeader()  : bool
isDispatched()  : mixed
setArgument()  : mixed
setArguments()  : mixed
setControllerActionName()  : mixed
setControllerAliasToClassNameMapping()  : mixed
setControllerExtensionName()  : mixed
setControllerName()  : mixed
setControllerObjectName()  : mixed
setDispatched()  : mixed
setFormat()  : mixed
setOriginalRequest()  : mixed
setOriginalRequestMappingResults()  : mixed
setPluginName()  : mixed
withAddedHeader()  : self
withArgument()  : self
Return an instance with the specified argument set.
withArguments()  : self
Return an instance with the specified extbase arguments, replacing any arguments which existed before.
withAttribute()  : self
withBody()  : self
withControllerActionName()  : self
Return an instance with the specified controller action name set.
withControllerAliasToClassNameMapping()  : self
withControllerExtensionName()  : self
Return an instance with the specified controller extension name set.
withControllerName()  : self
Return an instance with the specified controller name set.
withControllerObjectName()  : self
Return an instance with the specified controller object name set.
withCookieParams()  : self
withFormat()  : self
Return an instance with the specified derived request attribute.
withHeader()  : self
withMethod()  : self
withoutAttribute()  : ServerRequestInterface
withoutHeader()  : self
withParsedBody()  : self
withPluginName()  : self
Return an instance with the specified plugin name set.
withProtocolVersion()  : self
withQueryParams()  : self
withRequestTarget()  : self
withUploadedFiles()  : self
withUri()  : self
getExtbaseAttribute()  : ExtbaseRequestParameters
ExtbaseAttribute attached as attribute 'extbase' to $request carries extbase specific request values. This helper method type hints this attribute.

Properties

$request

protected ServerRequestInterface $request

Methods

__construct()

public __construct([mixed $request = null ]) : mixed
Parameters
$request : mixed = null
Tags
todo

v12: final public function __construct(ServerRequestInterface $request)

getArgument()

Returns the value of the specified argument.

public getArgument(mixed $argumentName) : string|array<string|int, mixed>
Parameters
$argumentName : mixed

Name of the argument

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

Value of the argument

getArguments()

Returns an array of extbase arguments and their values.

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

getAttribute()

public getAttribute(mixed $name[, mixed $default = null ]) : mixed
Parameters
$name : mixed
$default : mixed = null
Tags
inheritdoc

getAttributes()

public getAttributes() : array<string|int, mixed>
Tags
inheritdoc
Return values
array<string|int, mixed>

getBaseUri()

public getBaseUri() : mixed
Deprecated

since v11, will be removed in v12.

getBody()

public getBody() : StreamInterface
Tags
inheritdoc
Return values
StreamInterface

getControllerActionName()

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

public getControllerActionName() : mixed
Tags
todo:

Should be "public function getControllerActionName(): string", blocked by testing-framework

getControllerExtensionKey()

Returns the extension key of the specified controller.

public getControllerExtensionKey() : string
Return values
string

The extension key

getControllerExtensionName()

Returns the extension name of the specified controller.

public getControllerExtensionName() : mixed
Tags
todo:

Should be "public function getControllerExtensionName(): string", blocked by testing-framework

getControllerName()

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

public getControllerName() : mixed
Tags
todo:

Should be "public function getControllerName(): string", blocked by testing-framework

getControllerObjectName()

Returns the object name of the controller defined by the package key and controller name.

public getControllerObjectName() : string
Tags
inheritdoc
Return values
string

The controller's Object Name

getCookieParams()

public getCookieParams() : array<string|int, mixed>
Tags
inheritdoc
Return values
array<string|int, mixed>

getFormat()

Returns the requested representation format, something like "html", "xml", "png", "json" or the like.

public getFormat() : string
Return values
string

getHeader()

public getHeader(mixed $name) : array<string|int, mixed>
Parameters
$name : mixed
Tags
inheritdoc
Return values
array<string|int, mixed>

getHeaderLine()

public getHeaderLine(mixed $name) : string
Parameters
$name : mixed
Tags
inheritdoc
Return values
string

getHeaders()

public getHeaders() : array<string|int, mixed>
Tags
inheritdoc
Return values
array<string|int, mixed>

getInternalArgument()

public getInternalArgument(mixed $argumentName) : mixed
Parameters
$argumentName : mixed
Internal

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

getInternalArguments()

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>

getMethod()

public getMethod() : string
Tags
inheritdoc
Return values
string

getOriginalRequest()

public getOriginalRequest() : Request|null
Internal

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

Return values
Request|null

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

getParsedBody()

public getParsedBody() : mixed
Tags
inheritdoc

getPluginName()

Returns the plugin key.

public getPluginName() : mixed
Tags
todo:

Should be "public function getPluginName(): string", blocked by testing-framework

getProtocolVersion()

public getProtocolVersion() : string
Tags
inheritdoc
Return values
string

getQueryParams()

public getQueryParams() : array<string|int, mixed>
Tags
inheritdoc
Return values
array<string|int, mixed>

getRequestTarget()

public getRequestTarget() : string
Tags
inheritdoc
Return values
string

getRequestUri()

public getRequestUri() : mixed
Deprecated

since v11, will be removed in v12.

getServerParams()

public getServerParams() : array<string|int, mixed>
Tags
inheritdoc
Return values
array<string|int, mixed>

getUploadedFiles()

public getUploadedFiles() : array<string|int, mixed>
Tags
inheritdoc
Return values
array<string|int, mixed>

getUri()

public getUri() : UriInterface
Tags
inheritdoc
Return values
UriInterface

hasArgument()

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

public hasArgument(mixed $argumentName) : bool
Parameters
$argumentName : mixed
Tags
inheritDoc
Return values
bool

hasHeader()

public hasHeader(mixed $name) : bool
Parameters
$name : mixed
Tags
inheritdoc
Return values
bool

isDispatched()

public isDispatched() : mixed
Deprecated

since v11, will be removed in v12.

setArgument()

public setArgument(mixed $argumentName, mixed $value) : mixed
Parameters
$argumentName : mixed
$value : mixed
Internal

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

setArguments()

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

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

setControllerActionName()

public setControllerActionName(mixed $actionName) : mixed
Parameters
$actionName : mixed
Internal

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

setControllerAliasToClassNameMapping()

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

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

setControllerExtensionName()

public setControllerExtensionName(mixed $controllerExtensionName) : mixed
Parameters
$controllerExtensionName : mixed
Internal

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

setControllerName()

public setControllerName(mixed $controllerName) : mixed
Parameters
$controllerName : mixed
Internal

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

setControllerObjectName()

public setControllerObjectName(mixed $controllerObjectName) : mixed
Parameters
$controllerObjectName : mixed
Internal

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

setDispatched()

public setDispatched(mixed $flag) : mixed
Deprecated

since v11, will be removed in v12. Violates immutability.

Parameters
$flag : mixed

setFormat()

public setFormat(mixed $format) : mixed
Parameters
$format : mixed
Internal

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

setOriginalRequest()

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

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

setOriginalRequestMappingResults()

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

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

setPluginName()

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

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

withAddedHeader()

public withAddedHeader(mixed $name, mixed $value) : self
Parameters
$name : mixed
$value : mixed
Tags
inheritdoc
Return values
self

withArgument()

Return an instance with the specified argument set.

public withArgument(string $argumentName, mixed $value) : self
Parameters
$argumentName : string

Name of the argument to set

$value : mixed

The new value

Return values
self

withArguments()

Return an instance with the specified extbase arguments, replacing any arguments which existed before.

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

withAttribute()

public withAttribute(mixed $name, mixed $value) : self
Parameters
$name : mixed
$value : mixed
Tags
inheritdoc
Return values
self

withBody()

public withBody(StreamInterface $body) : self
Parameters
$body : StreamInterface
Tags
inheritdoc
Return values
self

withControllerActionName()

Return an instance with the specified controller action name set.

public withControllerActionName(string|null $actionName) : self

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

Parameters
$actionName : string|null

Action name

Return values
self

withControllerAliasToClassNameMapping()

public withControllerAliasToClassNameMapping(array<string|int, mixed> $controllerAliasToClassNameMapping) : self
Parameters
$controllerAliasToClassNameMapping : array<string|int, mixed>
Internal

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

Return values
self

withControllerExtensionName()

Return an instance with the specified controller extension name set.

public withControllerExtensionName(string|null $controllerExtensionName) : self
Parameters
$controllerExtensionName : string|null

Extension name

Return values
self

withControllerName()

Return an instance with the specified controller name set.

public withControllerName(string|null $controllerName) : self

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

Parameters
$controllerName : string|null

Controller name

Return values
self

withControllerObjectName()

Return an instance with the specified controller object name set.

public withControllerObjectName(string $controllerObjectName) : self
Parameters
$controllerObjectName : string
Return values
self

withCookieParams()

public withCookieParams(array<string|int, mixed> $cookies) : self
Parameters
$cookies : array<string|int, mixed>
Tags
inheritdoc
Return values
self

withFormat()

Return an instance with the specified derived request attribute.

public withFormat(string $format) : self

This method allows setting a single derived request attribute as described in getFormat().

Parameters
$format : string
Return values
self

withHeader()

public withHeader(mixed $name, mixed $value) : self
Parameters
$name : mixed
$value : mixed
Tags
inheritdoc
Return values
self

withMethod()

public withMethod(mixed $method) : self
Parameters
$method : mixed
Tags
inheritdoc
Return values
self

withoutAttribute()

public withoutAttribute(mixed $name) : ServerRequestInterface
Parameters
$name : mixed
Tags
inheritdoc
Return values
ServerRequestInterface

withoutHeader()

public withoutHeader(mixed $name) : self
Parameters
$name : mixed
Tags
inheritdoc
Return values
self

withParsedBody()

public withParsedBody(mixed $data) : self
Parameters
$data : mixed
Tags
inheritdoc
Return values
self

withPluginName()

Return an instance with the specified plugin name set.

public withPluginName([mixed $pluginName = null ]) : self
Parameters
$pluginName : mixed = null
Return values
self

withProtocolVersion()

public withProtocolVersion(mixed $version) : self
Parameters
$version : mixed
Tags
inheritdoc
Return values
self

withQueryParams()

public withQueryParams(array<string|int, mixed> $query) : self
Parameters
$query : array<string|int, mixed>
Tags
inheritdoc
Return values
self

withRequestTarget()

public withRequestTarget(mixed $requestTarget) : self
Parameters
$requestTarget : mixed
Tags
inheritdoc
Return values
self

withUploadedFiles()

public withUploadedFiles(array<string|int, mixed> $uploadedFiles) : self
Parameters
$uploadedFiles : array<string|int, mixed>
Tags
inheritdoc
Return values
self

withUri()

public withUri(UriInterface $uri[, mixed $preserveHost = false ]) : self
Parameters
$uri : UriInterface
$preserveHost : mixed = false
Tags
inheritdoc
Return values
self

        
On this page

Search results