Request

class \TYPO3\CMS\Extbase\Mvc\Request

Implements
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

RequestInterface
Contract for an extbase request.

Properties

$request  : ServerRequestInterface

Methods

__construct()  : mixed
getArgument()  : mixed
Returns the value of the specified argument.
getArguments()  : array
Returns an array of extbase arguments and their values.
getAttribute()  : mixed
getAttributes()  : array
getBody()  : StreamInterface
getControllerActionName()  : string
Returns the name of the action the controller is supposed to execute.
getControllerExtensionKey()  : string
Returns the extension key of the specified controller.
getControllerExtensionName()  : string
Returns the extension name of the specified controller.
getControllerName()  : string
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
getFormat()  : string
Returns the requested representation format, something like "html", "xml", "png", "json" or the like.
getHeader()  : array
getHeaderLine()  : string
getHeaders()  : array
getMethod()  : string
getParsedBody()  : mixed
getPluginName()  : string
Returns the plugin key.
getProtocolVersion()  : string
Methods implementing MessageInterface
getQueryParams()  : array
getRequestTarget()  : string
Methods implementing RequestInterface
getServerParams()  : array
Methods implementing ServerRequestInterface
getUploadedFiles()  : array
getUri()  : UriInterface
hasArgument()  : bool
Checks if an argument of the given name exists (is set).
hasHeader()  : bool
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.
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 final __construct(ServerRequestInterface $request) : mixed

Parameters

$request : ServerRequestInterface

getArgument()

Returns the value of the specified argument.

public getArgument(string $argumentName) : mixed

Parameters

$argumentName : string

getArguments()

Returns an array of extbase arguments and their values.

public getArguments() : array

Return values

array

getAttribute()

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

Parameters

$name : mixed
$default : mixed = null

getAttributes()

public getAttributes() : array

Return values

array

getBody()

public getBody() : StreamInterface

Return values

StreamInterface

getControllerActionName()

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

public getControllerActionName() : string

Return values

string

getControllerExtensionKey()

Returns the extension key of the specified controller.

public getControllerExtensionKey() : string

Return values

string

getControllerExtensionName()

Returns the extension name of the specified controller.

public getControllerExtensionName() : string

Return values

string

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() : string

Return values

string

getControllerObjectName()

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

public getControllerObjectName() : string

Return values

string

getCookieParams()

public getCookieParams() : array

Return values

array

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

Parameters

$name : mixed

Return values

array

getHeaderLine()

public getHeaderLine(mixed $name) : string

Parameters

$name : mixed

Return values

string

getHeaders()

public getHeaders() : array

Return values

array

getMethod()

public getMethod() : string

Return values

string

getParsedBody()

public getParsedBody() : mixed

getPluginName()

Returns the plugin key.

public getPluginName() : string

Return values

string

getProtocolVersion()

Methods implementing MessageInterface

public getProtocolVersion() : string

Return values

string

getQueryParams()

public getQueryParams() : array

Return values

array

getRequestTarget()

Methods implementing RequestInterface

public getRequestTarget() : string

Return values

string

getServerParams()

Methods implementing ServerRequestInterface

public getServerParams() : array

Return values

array

getUploadedFiles()

public getUploadedFiles() : array

Return values

array

getUri()

public getUri() : UriInterface

Return values

UriInterface

hasArgument()

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

public hasArgument(string $argumentName) : bool

Parameters

$argumentName : string

Return values

bool

hasHeader()

public hasHeader(mixed $name) : bool

Parameters

$name : mixed

Return values

bool

withAddedHeader()

public withAddedHeader(mixed $name, mixed $value) : self

Parameters

$name : mixed
$value : mixed

Return values

self

withArgument()

Return an instance with the specified argument set.

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

Parameters

$argumentName : string
$value : mixed

Return values

self

withArguments()

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

public withArguments(array $arguments) : self

Parameters

$arguments : array

Return values

self

withAttribute()

public withAttribute(mixed $name, mixed $value) : self

Parameters

$name : mixed
$value : mixed

Return values

self

withBody()

public withBody(StreamInterface $body) : self

Parameters

$body : StreamInterface

Return values

self

withControllerActionName()

Return an instance with the specified controller action name set.

public withControllerActionName(string $actionName) : self

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

Parameters

$actionName : string

Return values

self

withControllerExtensionName()

Return an instance with the specified controller extension name set.

public withControllerExtensionName(string $controllerExtensionName) : self

Parameters

$controllerExtensionName : string

Return values

self

withControllerName()

Return an instance with the specified controller name set.

public withControllerName(string $controllerName) : self

Parameters

$controllerName : string

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 $cookies) : self

Parameters

$cookies : array

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

Return values

self

withMethod()

public withMethod(mixed $method) : self

Parameters

$method : mixed

Return values

self

withoutAttribute()

public withoutAttribute(mixed $name) : ServerRequestInterface

Parameters

$name : mixed

Return values

ServerRequestInterface

withoutHeader()

public withoutHeader(mixed $name) : self

Parameters

$name : mixed

Return values

self

withParsedBody()

public withParsedBody(mixed $data) : self

Parameters

$data : mixed

Return values

self

withPluginName()

Return an instance with the specified plugin name set.

public withPluginName(string $pluginName) : self

Parameters

$pluginName : string

Return values

self

withProtocolVersion()

public withProtocolVersion(mixed $version) : self

Parameters

$version : mixed

Return values

self

withQueryParams()

public withQueryParams(array $query) : self

Parameters

$query : array

Return values

self

withRequestTarget()

public withRequestTarget(mixed $requestTarget) : self

Parameters

$requestTarget : mixed

Return values

self

withUploadedFiles()

public withUploadedFiles(array $uploadedFiles) : self

Parameters

$uploadedFiles : array

Return values

self

withUri()

public withUri(UriInterface $uri[, mixed $preserveHost = false ]) : self

Parameters

$uri : UriInterface
$preserveHost : mixed = false

Return values

self
On this page