RequestBuilder

class \TYPO3\CMS\Extbase\Mvc\Web\RequestBuilder

Implements
SingletonInterface

Builds a web request.

Table of Contents

Interfaces

SingletonInterface
"empty" interface for singletons (marker interface pattern)

Properties

$allowedControllerActions  : array
The allowed actions of the controller. This actions can be called via $_GET and $_POST.
$configurationManager  : ConfigurationManagerInterface
$defaultControllerName  : string
The default controller name
$defaultFormat  : string
The default format of the response object
$extensionName  : string
The name of the extension (in UpperCamelCase)
$extensionService  : ExtensionService
$pluginName  : string
This is a unique key for a plugin (not the extension key!)

Methods

build()  : Request
Builds a web request object from the raw HTTP information and the configuration
injectConfigurationManager()  : mixed
injectExtensionService()  : mixed
calculateFieldPaths()  : array
Returns an array of all possibles "field paths" for the given array.
loadDefaultValues()  : mixed
resolveActionName()  : string
Returns the current actionName extracted from given $parameters.
resolveControllerClassName()  : string
Returns the current ControllerName extracted from given $parameters.
untangleFilesArray()  : array
Transforms the convoluted _FILES superglobal into a manageable form.

Properties

$allowedControllerActions

The allowed actions of the controller. This actions can be called via $_GET and $_POST.

protected array $allowedControllerActions = []

$defaultControllerName

The default controller name

protected string $defaultControllerName = ''

$defaultFormat

The default format of the response object

protected string $defaultFormat = 'html'

$extensionName

The name of the extension (in UpperCamelCase)

protected string $extensionName

$pluginName

This is a unique key for a plugin (not the extension key!)

protected string $pluginName = 'plugin'

Methods

build()

Builds a web request object from the raw HTTP information and the configuration

public build(ServerRequestInterface $mainRequest) : Request

Parameters

$mainRequest : ServerRequestInterface

Return values

Request —

The web request as an object

calculateFieldPaths()

Returns an array of all possibles "field paths" for the given array.

protected calculateFieldPaths(array $structure[, string $firstLevelFieldName = null ]) : array

Parameters

$structure : array

The array to walk through

$firstLevelFieldName : string = null

Return values

array —

An array of paths (as strings) in the format "key1/key2/key3" ...

loadDefaultValues()

protected loadDefaultValues() : mixed

Tags

throws
Exception
see
Bootstrap::initializeConfiguration

resolveActionName()

Returns the current actionName extracted from given $parameters.

protected resolveActionName(string $controllerClassName, array $parameters) : string

If no action is specified, the defaultActionName will be returned. If that's not available or the specified action is not defined in the current plugin, an exception is thrown.

Parameters

$controllerClassName : string
$parameters : array

Tags

throws
InvalidActionNameException
throws
Exception
throws
PageNotFoundException

Return values

string

resolveControllerClassName()

Returns the current ControllerName extracted from given $parameters.

protected resolveControllerClassName(array $parameters) : string

If no controller is specified, the defaultControllerName will be returned. If that's not available, an exception is thrown.

Parameters

$parameters : array

Tags

throws
InvalidControllerNameException
throws
Exception

if the controller could not be resolved

throws
PageNotFoundException

Return values

string

untangleFilesArray()

Transforms the convoluted _FILES superglobal into a manageable form.

protected untangleFilesArray(array $convolutedFiles) : array

Parameters

$convolutedFiles : array

The _FILES superglobal

Return values

array —

Untangled files

On this page