PHP Class Neos\Flow\Cli\Request

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

Protected Properties

Свойство Type Description
$arguments array The arguments for this request
$command Command
$commandLineArguments array
$controllerCommandName string
$controllerObjectName string
$dispatched boolean If this request has been changed and needs to be dispatched again
$exceedingArguments array

Méthodes publiques

Méthode Description
getArgument ( string $argumentName ) : string Returns the value of the specified argument
getArguments ( ) : array Returns an ArrayObject of arguments and their values
getCommand ( ) : Command Returns the command object for this request
getControllerCommandName ( ) : string Returns the name of the command the controller is supposed to execute.
getControllerObjectName ( ) : string Returns the object name of the controller
getExceedingArguments ( ) : array Returns additional unnamed arguments (if any) which have been passed through the command line after all required arguments (if any) have been specified.
getMainRequest ( ) : Request Returns the this request, as CLI request nesting is not supported.
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 Returns true, as CLI request nesting is not supported.
setArgument ( string $argumentName, mixed $value ) : void Sets the value of the specified argument
setArguments ( array $arguments ) : void Sets the whole arguments array and therefore replaces any arguments which existed before.
setControllerCommandName ( string $commandName ) : void Sets the name of the command contained in this request.
setControllerObjectName ( string $controllerObjectName ) : void Sets the object name of the controller
setDispatched ( boolean $flag ) : void Sets the dispatched flag
setExceedingArguments ( array $exceedingArguments ) : void Sets the exceeding arguments

Method Details

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

getArguments() public méthode

Returns an ArrayObject 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)

getCommand() public méthode

Returns the command object for this request
public getCommand ( ) : Command
Résultat Command

getControllerCommandName() public méthode

Returns the name of the command the controller is supposed to execute.
public getControllerCommandName ( ) : string
Résultat string Command name

getControllerObjectName() public méthode

Returns the object name of the controller
public getControllerObjectName ( ) : string
Résultat string The controller's object name

getExceedingArguments() public méthode

For a command method with the signature ($argument1, $argument2) and for the command line ./flow acme:foo --argument1 Foo --argument2 Bar baz quux this method would return array(0 => 'baz', 1 => 'quux')
public getExceedingArguments ( ) : array
Résultat array Numeric array of exceeding argument values

getMainRequest() public méthode

Returns the this request, as CLI request nesting is not supported.
public getMainRequest ( ) : Request
Résultat Request

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

Returns true, as CLI request nesting is not supported.
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

setArguments() public méthode

Sets the whole arguments array and therefore replaces any arguments which existed before.
public setArguments ( array $arguments ) : void
$arguments array An array of argument names and their values
Résultat void

setControllerCommandName() public méthode

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

setControllerObjectName() public méthode

Sets the object name of the controller
public setControllerObjectName ( string $controllerObjectName ) : void
$controllerObjectName string Object name of the controller which processes this request
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

setExceedingArguments() public méthode

Sets the exceeding arguments
public setExceedingArguments ( array $exceedingArguments ) : void
$exceedingArguments array Numeric array of exceeding arguments
Résultat void

Property Details

$arguments protected_oe property

The arguments for this request
protected array $arguments
Résultat array

$command protected_oe property

protected Command,Neos\Flow\Cli $command
Résultat Command

$commandLineArguments protected_oe property

protected array $commandLineArguments
Résultat array

$controllerCommandName protected_oe property

protected string $controllerCommandName
Résultat string

$controllerObjectName protected_oe property

protected string $controllerObjectName
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

$exceedingArguments protected_oe property

protected array $exceedingArguments
Résultat array