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
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
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
Return values
array<string|int, mixed>getAttribute()
public
getAttribute(mixed $name[, mixed $default = null ]) : mixed
Parameters
- $name : mixed
- $default : mixed = null
Tags
getAttributes()
public
getAttributes() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getBaseUri()
public
getBaseUri() : mixed
since v11, will be removed in v12.
getBody()
public
getBody() : StreamInterface
Tags
Return values
StreamInterfacegetControllerActionName()
Returns the name of the action the controller is supposed to execute.
public
getControllerActionName() : mixed
Tags
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
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
getControllerObjectName()
Returns the object name of the controller defined by the package key and controller name.
public
getControllerObjectName() : string
Tags
Return values
string —The controller's Object Name
getCookieParams()
public
getCookieParams() : array<string|int, mixed>
Tags
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
stringgetHeader()
public
getHeader(mixed $name) : array<string|int, mixed>
Parameters
- $name : mixed
Tags
Return values
array<string|int, mixed>getHeaderLine()
public
getHeaderLine(mixed $name) : string
Parameters
- $name : mixed
Tags
Return values
stringgetHeaders()
public
getHeaders() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getInternalArgument()
public
getInternalArgument(mixed $argumentName) : mixed
Parameters
- $argumentName : mixed
only to be used within Extbase, not part of TYPO3 Core API.
getInternalArguments()
public
getInternalArguments() : array<string|int, mixed>
only to be used within Extbase, not part of TYPO3 Core API.
Return values
array<string|int, mixed>getMethod()
public
getMethod() : string
Tags
Return values
stringgetOriginalRequest()
public
getOriginalRequest() : Request|null
only to be used within Extbase, not part of TYPO3 Core API.
Return values
Request|nullgetOriginalRequestMappingResults()
Get the request mapping results for the original request.
public
getOriginalRequestMappingResults() : Result
only to be used within Extbase, not part of TYPO3 Core API.
Return values
ResultgetParsedBody()
public
getParsedBody() : mixed
Tags
getPluginName()
Returns the plugin key.
public
getPluginName() : mixed
Tags
getProtocolVersion()
public
getProtocolVersion() : string
Tags
Return values
stringgetQueryParams()
public
getQueryParams() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getRequestTarget()
public
getRequestTarget() : string
Tags
Return values
stringgetRequestUri()
public
getRequestUri() : mixed
since v11, will be removed in v12.
getServerParams()
public
getServerParams() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getUploadedFiles()
public
getUploadedFiles() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getUri()
public
getUri() : UriInterface
Tags
Return values
UriInterfacehasArgument()
Checks if an argument of the given name exists (is set).
public
hasArgument(mixed $argumentName) : bool
Parameters
- $argumentName : mixed
Tags
Return values
boolhasHeader()
public
hasHeader(mixed $name) : bool
Parameters
- $name : mixed
Tags
Return values
boolisDispatched()
public
isDispatched() : mixed
since v11, will be removed in v12.
setArgument()
public
setArgument(mixed $argumentName, mixed $value) : mixed
Parameters
- $argumentName : mixed
- $value : mixed
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>
only to be used within Extbase, not part of TYPO3 Core API. Violates immutability.
setControllerActionName()
public
setControllerActionName(mixed $actionName) : mixed
Parameters
- $actionName : mixed
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>
only to be used within Extbase, not part of TYPO3 Core API. Violates immutability.
setControllerExtensionName()
public
setControllerExtensionName(mixed $controllerExtensionName) : mixed
Parameters
- $controllerExtensionName : mixed
only to be used within Extbase, not part of TYPO3 Core API. Violates immutability.
setControllerName()
public
setControllerName(mixed $controllerName) : mixed
Parameters
- $controllerName : mixed
only to be used within Extbase, not part of TYPO3 Core API. Violates immutability.
setControllerObjectName()
public
setControllerObjectName(mixed $controllerObjectName) : mixed
Parameters
- $controllerObjectName : mixed
only to be used within Extbase, not part of TYPO3 Core API. Violates immutability.
setDispatched()
public
setDispatched(mixed $flag) : mixed
since v11, will be removed in v12. Violates immutability.
Parameters
- $flag : mixed
setFormat()
public
setFormat(mixed $format) : mixed
Parameters
- $format : mixed
only to be used within Extbase, not part of TYPO3 Core API. Violates immutability.
setOriginalRequest()
public
setOriginalRequest(Request $originalRequest) : mixed
Parameters
- $originalRequest : Request
only to be used within Extbase, not part of TYPO3 Core API. Violates immutability.
setOriginalRequestMappingResults()
public
setOriginalRequestMappingResults(Result $originalRequestMappingResults) : mixed
Parameters
- $originalRequestMappingResults : Result
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
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
Return values
selfwithArgument()
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
selfwithArguments()
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
selfwithAttribute()
public
withAttribute(mixed $name, mixed $value) : self
Parameters
- $name : mixed
- $value : mixed
Tags
Return values
selfwithBody()
public
withBody(StreamInterface $body) : self
Parameters
- $body : StreamInterface
Tags
Return values
selfwithControllerActionName()
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
selfwithControllerAliasToClassNameMapping()
public
withControllerAliasToClassNameMapping(array<string|int, mixed> $controllerAliasToClassNameMapping) : self
Parameters
- $controllerAliasToClassNameMapping : array<string|int, mixed>
only to be used within Extbase, not part of TYPO3 Core API.
Return values
selfwithControllerExtensionName()
Return an instance with the specified controller extension name set.
public
withControllerExtensionName(string|null $controllerExtensionName) : self
Parameters
- $controllerExtensionName : string|null
-
Extension name
Return values
selfwithControllerName()
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
selfwithControllerObjectName()
Return an instance with the specified controller object name set.
public
withControllerObjectName(string $controllerObjectName) : self
Parameters
- $controllerObjectName : string
Return values
selfwithCookieParams()
public
withCookieParams(array<string|int, mixed> $cookies) : self
Parameters
- $cookies : array<string|int, mixed>
Tags
Return values
selfwithFormat()
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
selfwithHeader()
public
withHeader(mixed $name, mixed $value) : self
Parameters
- $name : mixed
- $value : mixed
Tags
Return values
selfwithMethod()
public
withMethod(mixed $method) : self
Parameters
- $method : mixed
Tags
Return values
selfwithoutAttribute()
public
withoutAttribute(mixed $name) : ServerRequestInterface
Parameters
- $name : mixed
Tags
Return values
ServerRequestInterfacewithoutHeader()
public
withoutHeader(mixed $name) : self
Parameters
- $name : mixed
Tags
Return values
selfwithParsedBody()
public
withParsedBody(mixed $data) : self
Parameters
- $data : mixed
Tags
Return values
selfwithPluginName()
Return an instance with the specified plugin name set.
public
withPluginName([mixed $pluginName = null ]) : self
Parameters
- $pluginName : mixed = null
Return values
selfwithProtocolVersion()
public
withProtocolVersion(mixed $version) : self
Parameters
- $version : mixed
Tags
Return values
selfwithQueryParams()
public
withQueryParams(array<string|int, mixed> $query) : self
Parameters
- $query : array<string|int, mixed>
Tags
Return values
selfwithRequestTarget()
public
withRequestTarget(mixed $requestTarget) : self
Parameters
- $requestTarget : mixed
Tags
Return values
selfwithUploadedFiles()
public
withUploadedFiles(array<string|int, mixed> $uploadedFiles) : self
Parameters
- $uploadedFiles : array<string|int, mixed>
Tags
Return values
selfwithUri()
public
withUri(UriInterface $uri[, mixed $preserveHost = false ]) : self
Parameters
- $uri : UriInterface
- $preserveHost : mixed = false
Tags
Return values
selfgetExtbaseAttribute()
ExtbaseAttribute attached as attribute 'extbase' to $request carries extbase specific request values. This helper method type hints this attribute.
protected
getExtbaseAttribute() : ExtbaseRequestParameters