PHP Class Neos\Flow\Mvc\ActionRequest

Inheritance: implements Neos\Flow\Mvc\RequestInterface
Afficher le fichier Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Свойство Type Description
$argumentNamespace string An optional namespace for arguments of this request. Used, for example, in plugins and widgets.
$arguments array The arguments for this request. They must be only simple types, no objects allowed.
$controllerActionName string Name of the action the controller is supposed to take.
$controllerName string Object name of the controller which is supposed to handle this request.
$controllerPackageKey string Package key of the controller which is supposed to handle this request.
$controllerSubpackageKey string Subpackage key of the controller which is supposed to handle this request.
$dispatched boolean If this request has been changed and needs to be dispatched again
$format string The requested representation format
$hashService Neos\Flow\Security\Cryptography\HashService
$internalArguments array 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.
$objectManager Neos\Flow\ObjectManagement\ObjectManagerInterface
$packageManager Neos\Flow\Package\PackageManagerInterface
$parentRequest ActionRequest | Request The parent request – either another ActionRequest or Http Request
$pluginArguments array Arguments and configuration for plugins – including widgets – which are sub controllers to the controller referred to by this request.
$referringRequest ActionRequest Cached pointer to a request referring to this one (if any)
$rootRequest object Cached pointer to the root request (usually an HTTP request)

Méthodes publiques

Méthode Description
__clone ( ) Resets the dispatched status to FALSE
__construct ( ActionRequest | Request $parentRequest ) Constructs this action request
__sleep ( ) : array We provide our own __sleep method, where we serialize all properties *except* the parentRequest if it is a HTTP request -- as this one contains $_SERVER etc.
getArgument ( string $argumentName ) : string Returns the value of the specified argument
getArgumentNamespace ( ) : string Returns the argument namespace, if any.
getArguments ( ) : array Returns an Array of arguments and their values
getControllerActionName ( ) : string Returns the name of the action the controller is supposed to execute.
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 Returns the object name of the controller defined by the package key and controller name
getControllerPackageKey ( ) : string Returns the package key of the specified controller.
getControllerSubpackageKey ( ) : string Returns the subpackage key of the specified controller.
getFormat ( ) : string Returns the requested representation format
getHttpRequest ( ) : Request Returns the top level request: the HTTP request object
getInternalArgument ( string $argumentName ) : string Returns the value of the specified internal argument.
getInternalArguments ( ) : array Returns the internal arguments of the request, that is, all arguments whose name starts with two underscores.
getMainRequest ( ) : ActionRequest Returns the top level ActionRequest: the one just below the HTTP request
getParentRequest ( ) : ActionRequest | Request Returns the parent request
getPluginArguments ( ) : array Returns an array of plugin argument configurations
getReferringRequest ( ) : ActionRequest Returns an ActionRequest which referred to this request, if any.
hasArgument ( string $argumentName ) : boolean Checks if an argument of the given name exists (is set)
isDispatched ( ) : boolean If this request has been dispatched and addressed by the responsible controller and the response is ready to be sent.
isMainRequest ( ) : boolean Checks if this request is the uppermost ActionRequest, just one below the HTTP request.
setArgument ( string $argumentName, mixed $value ) : void Sets the value of the specified argument
setArgumentNamespace ( string $namespace ) : void Sets a namespace for the arguments of this request.
setArguments ( array $arguments ) : void Sets the specified arguments.
setControllerActionName ( string $actionName ) : void Sets the name of the action contained in this request.
setControllerName ( string $controllerName ) : void Sets the name of the controller which is supposed to handle the request.
setControllerObjectName ( string $unknownCasedControllerObjectName ) : void Explicitly sets the object name of the controller
setControllerPackageKey ( string $packageKey ) : void Sets the package key of the controller.
setControllerSubpackageKey ( string $subpackageKey ) : void Sets the subpackage key of the controller.
setDispatched ( boolean $flag ) : void Sets the dispatched flag
setFormat ( string $format ) : void Sets the requested representation format

Méthodes protégées

Méthode Description
emitRequestDispatched ( ActionRequest $request ) : void Emits a signal when a Request has been dispatched

Method Details

__clone() public méthode

Resets the dispatched status to FALSE
public __clone ( )

__construct() public méthode

Constructs this action request
public __construct ( ActionRequest | Request $parentRequest )
$parentRequest ActionRequest | Request Either an HTTP request or another ActionRequest

__sleep() public méthode

We provide our own __sleep method, where we serialize all properties *except* the parentRequest if it is a HTTP request -- as this one contains $_SERVER etc.
public __sleep ( ) : array
Résultat array

emitRequestDispatched() protected méthode

The action request is not proxyable, so the signal is dispatched manually here. The safeguard allows unit tests without the dispatcher dependency.
protected emitRequestDispatched ( ActionRequest $request ) : void
$request ActionRequest
Résultat void

getArgument() public méthode

Returns the value of the specified argument
public getArgument ( string $argumentName ) : string
$argumentName string Name of the argument
Résultat string Value of the argument

getArgumentNamespace() public méthode

Returns the argument namespace, if any.
public getArgumentNamespace ( ) : string
Résultat string

getArguments() public méthode

Returns an Array of arguments and their values
public getArguments ( ) : array
Résultat array Array of arguments and their values (which may be arguments and values as well)

getControllerActionName() public méthode

Returns the name of the action the controller is supposed to execute.
public getControllerActionName ( ) : string
Résultat string Action name

getControllerName() public méthode

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
Résultat string Name of the controller

getControllerObjectName() public méthode

Returns the object name of the controller defined by the package key and controller name
public getControllerObjectName ( ) : string
Résultat string The controller's Object Name

getControllerPackageKey() public méthode

Returns the package key of the specified controller.
public getControllerPackageKey ( ) : string
Résultat string The package key

getControllerSubpackageKey() public méthode

If there is no subpackage key set, the method returns NULL.
public getControllerSubpackageKey ( ) : string
Résultat string The subpackage key

getFormat() public méthode

Returns the requested representation format
public getFormat ( ) : string
Résultat string The desired format, something like "html", "xml", "png", "json" or the like.

getHttpRequest() public méthode

Returns the top level request: the HTTP request object
public getHttpRequest ( ) : Request
Résultat Neos\Flow\Http\Request

getInternalArgument() public méthode

Internal arguments are set via setArgument(). In order to be handled as an internal argument, its name must start with two underscores.
public getInternalArgument ( string $argumentName ) : string
$argumentName string Name of the argument, for example "__fooBar"
Résultat string Value of the argument, or NULL if not set.

getInternalArguments() public méthode

Returns the internal arguments of the request, that is, all arguments whose name starts with two underscores.
public getInternalArguments ( ) : array
Résultat array

getMainRequest() public méthode

Returns the top level ActionRequest: the one just below the HTTP request
public getMainRequest ( ) : ActionRequest
Résultat ActionRequest

getParentRequest() public méthode

Returns the parent request
public getParentRequest ( ) : ActionRequest | Request
Résultat ActionRequest | Request

getPluginArguments() public méthode

Returns an array of plugin argument configurations
public getPluginArguments ( ) : array
Résultat array

getReferringRequest() public méthode

The referring request is not set or determined automatically but must be explicitly set through the corresponding internal argument "__referrer". This mechanism is used by Flow's form and validation mechanisms.
public getReferringRequest ( ) : ActionRequest
Résultat ActionRequest the referring request, or NULL if no referrer found

hasArgument() public méthode

Checks if an argument of the given name exists (is set)
public hasArgument ( string $argumentName ) : boolean
$argumentName string Name of the argument to check
Résultat boolean TRUE if the argument is set, otherwise FALSE

isDispatched() public méthode

The dispatcher will try to dispatch the request again if it has not been addressed yet.
public isDispatched ( ) : boolean
Résultat boolean TRUE if this request has been dispatched successfully

isMainRequest() public méthode

Checks if this request is the uppermost ActionRequest, just one below the HTTP request.
public isMainRequest ( ) : boolean
Résultat boolean

setArgument() public méthode

Sets the value of the specified argument
public setArgument ( string $argumentName, mixed $value ) : void
$argumentName string Name of the argument to set
$value mixed The new value
Résultat void

setArgumentNamespace() public méthode

This doesn't affect the actual behavior of argument handling within this classes' methods but is used in other parts of Flow and its libraries to render argument names which don't conflict with each other.
public setArgumentNamespace ( string $namespace ) : void
$namespace string Argument namespace
Résultat void

setArguments() public méthode

The arguments array will be reset therefore any arguments which existed before will be overwritten!
public setArguments ( array $arguments ) : void
$arguments array An array of argument names and their values
Résultat void

setControllerActionName() public méthode

Note that the action name must start with a lower case letter and is case sensitive.
public setControllerActionName ( string $actionName ) : void
$actionName string Name of the action to execute by the controller
Résultat void

setControllerName() public méthode

Note: This is not the object name of the controller! Examples: "Standard", "Account", ...
public setControllerName ( string $controllerName ) : void
$controllerName string Name of the controller
Résultat void

setControllerObjectName() public méthode

Explicitly sets the object name of the controller
public setControllerObjectName ( string $unknownCasedControllerObjectName ) : void
$unknownCasedControllerObjectName string The fully qualified controller object name
Résultat void

setControllerPackageKey() public méthode

This function tries to determine the correct case for the given package key. If the Package Manager does not know the specified package, the package key cannot be verified or corrected and is stored as is.
public setControllerPackageKey ( string $packageKey ) : void
$packageKey string The package key
Résultat void

setControllerSubpackageKey() public méthode

Sets the subpackage key of the controller.
public setControllerSubpackageKey ( string $subpackageKey ) : void
$subpackageKey string The subpackage key.
Résultat void

setDispatched() public méthode

Sets the dispatched flag
public setDispatched ( boolean $flag ) : void
$flag boolean If this request has been dispatched
Résultat void

setFormat() public méthode

Sets the requested representation format
public setFormat ( string $format ) : void
$format string The desired format, something like "html", "xml", "png", "json" or the like. Can even be something like "rss.xml".
Résultat void

Property Details

$argumentNamespace protected_oe property

An optional namespace for arguments of this request. Used, for example, in plugins and widgets.
protected string $argumentNamespace
Résultat string

$arguments protected_oe property

The arguments for this request. They must be only simple types, no objects allowed.
protected array $arguments
Résultat array

$controllerActionName protected_oe property

Name of the action the controller is supposed to take.
protected string $controllerActionName
Résultat string

$controllerName protected_oe property

Object name of the controller which is supposed to handle this request.
protected string $controllerName
Résultat string

$controllerPackageKey protected_oe property

Package key of the controller which is supposed to handle this request.
protected string $controllerPackageKey
Résultat string

$controllerSubpackageKey protected_oe property

Subpackage key of the controller which is supposed to handle this request.
protected string $controllerSubpackageKey
Résultat string

$dispatched protected_oe property

If this request has been changed and needs to be dispatched again
protected bool $dispatched
Résultat boolean

$format protected_oe property

The requested representation format
protected string $format
Résultat string

$hashService protected_oe property

protected HashService,Neos\Flow\Security\Cryptography $hashService
Résultat Neos\Flow\Security\Cryptography\HashService

$internalArguments protected_oe property

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.
protected array $internalArguments
Résultat array

$objectManager protected_oe property

protected ObjectManagerInterface,Neos\Flow\ObjectManagement $objectManager
Résultat Neos\Flow\ObjectManagement\ObjectManagerInterface

$packageManager protected_oe property

protected PackageManagerInterface,Neos\Flow\Package $packageManager
Résultat Neos\Flow\Package\PackageManagerInterface

$parentRequest protected_oe property

The parent request – either another ActionRequest or Http Request
protected ActionRequest,Neos\Flow\Mvc|Request,Neos\Flow\Http $parentRequest
Résultat ActionRequest | Request

$pluginArguments protected_oe property

Arguments and configuration for plugins – including widgets – which are sub controllers to the controller referred to by this request.
protected array $pluginArguments
Résultat array

$referringRequest protected_oe property

Cached pointer to a request referring to this one (if any)
protected ActionRequest,Neos\Flow\Mvc $referringRequest
Résultat ActionRequest

$rootRequest protected_oe property

Cached pointer to the root request (usually an HTTP request)
protected object $rootRequest
Résultat object