TYPO3  7.6
Public Member Functions | Protected Attributes | List of all members
Request Class Reference
Inheritance diagram for Request:
RequestInterface

Public Member Functions

 injectObjectManager (\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager)
 
 setCallingScript ($callingScript)
 
 getCallingScript ()
 
 setDispatched ($flag)
 
 isDispatched ()
 
 setControllerObjectName ($controllerObjectName)
 
 getControllerObjectName ()
 
 getControllerExtensionName ()
 
 setControllerCommandName ($commandName)
 
 getControllerCommandName ()
 
 getCommand ()
 
 setArgument ($argumentName, $value)
 
 setArguments (array $arguments)
 
 getArgument ($argumentName)
 
 hasArgument ($argumentName)
 
 getArguments ()
 
 setExceedingArguments (array $exceedingArguments)
 
 getExceedingArguments ()
 

Protected Attributes

 $objectManager
 
 $controllerObjectName
 
 $controllerCommandName = 'default'
 
 $controllerExtensionName = null
 
 $arguments = array()
 
 $exceedingArguments = array()
 
 $dispatched = false
 
 $commandLineArguments
 
 $command = null
 
 $callingScript
 

Detailed Description

Represents a CLI request.

http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later

Definition at line 23 of file extbase/Classes/Mvc/Cli/Request.php.

Member Function Documentation

getArgument (   $argumentName)

Returns the value of the specified argument

Parameters
string$argumentNameName of the argument
Returns
string Value of the argument
Exceptions
\TYPO3\CMS\Extbase\Mvc\Exception\NoSuchArgumentExceptionif such an argument does not exist

Implements RequestInterface.

Definition at line 235 of file extbase/Classes/Mvc/Cli/Request.php.

getArguments ( )

Returns an ArrayObject of arguments and their values

Returns
array Array of arguments and their values (which may be arguments and values as well)

Implements RequestInterface.

Definition at line 259 of file extbase/Classes/Mvc/Cli/Request.php.

References Request\$arguments.

getCallingScript ( )
Returns
string

Definition at line 98 of file extbase/Classes/Mvc/Cli/Request.php.

References Request\$callingScript.

getCommand ( )

Returns the command object for this request

Returns

Definition at line 192 of file extbase/Classes/Mvc/Cli/Request.php.

References Request\$command.

getControllerCommandName ( )

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

Returns
string Command name

Definition at line 182 of file extbase/Classes/Mvc/Cli/Request.php.

References Request\$controllerCommandName.

getControllerExtensionName ( )

Returns the extension name of the specified controller.

Returns
string The extension name

Definition at line 158 of file extbase/Classes/Mvc/Cli/Request.php.

References Request\$controllerExtensionName.

getControllerObjectName ( )

Returns the object name of the controller

Returns
string The controller's object name

Implements RequestInterface.

Definition at line 148 of file extbase/Classes/Mvc/Cli/Request.php.

References Request\$controllerObjectName.

getExceedingArguments ( )

Returns additional unnamed arguments (if any) which have been passed through the command line after all required arguments (if any) have been specified.

For a command method with the signature ($argument1, $argument2) and for the command line cli_dispatch.phpsh extbase some-key someaction acme:foo –argument1 Foo –argument2 Bar baz quux this method would return array(0 => 'baz', 1 => 'quux')

Returns
array Numeric array of exceeding argument values

Definition at line 285 of file extbase/Classes/Mvc/Cli/Request.php.

References Request\$exceedingArguments.

hasArgument (   $argumentName)

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

Parameters
string$argumentNameName of the argument to check
Returns
bool TRUE if the argument is set, otherwise FALSE

Implements RequestInterface.

Definition at line 249 of file extbase/Classes/Mvc/Cli/Request.php.

injectObjectManager ( \TYPO3\CMS\Extbase\Object\ObjectManagerInterface  $objectManager)
Parameters
\TYPO3\CMS\Extbase\Object\ObjectManagerInterface$objectManager

Definition at line 82 of file extbase/Classes/Mvc/Cli/Request.php.

References Request\$objectManager.

isDispatched ( )

If this request has been dispatched and addressed by the responsible controller and the response is ready to be sent.

The dispatcher will try to dispatch the request again if it has not been addressed yet.

Returns
bool TRUE if this request has been disptached successfully

Implements RequestInterface.

Definition at line 123 of file extbase/Classes/Mvc/Cli/Request.php.

References Request\$dispatched.

setArgument (   $argumentName,
  $value 
)

Sets the value of the specified argument

Parameters
string$argumentNameName of the argument to set
mixed$valueThe new value
Exceptions
\TYPO3\CMS\Extbase\Mvc\Exception\InvalidArgumentNameException
Returns
void

Implements RequestInterface.

Definition at line 208 of file extbase/Classes/Mvc/Cli/Request.php.

setArguments ( array  $arguments)

Sets the whole arguments ArrayObject and therefore replaces any arguments which existed before.

Parameters
array$argumentsAn array of argument names and their values
Returns
void

Implements RequestInterface.

Definition at line 223 of file extbase/Classes/Mvc/Cli/Request.php.

References Request\$arguments.

setCallingScript (   $callingScript)
Parameters
string$callingScript

Definition at line 90 of file extbase/Classes/Mvc/Cli/Request.php.

References Request\$callingScript.

setControllerCommandName (   $commandName)

Sets the name of the command contained in this request.

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

Parameters
string$commandNameName of the command to execute by the controller
Returns
void

Definition at line 171 of file extbase/Classes/Mvc/Cli/Request.php.

setControllerObjectName (   $controllerObjectName)

Sets the object name of the controller

Parameters
string$controllerObjectNameThe fully qualified controller object name
Returns
void

Definition at line 134 of file extbase/Classes/Mvc/Cli/Request.php.

References Request\$controllerObjectName.

setDispatched (   $flag)

Sets the dispatched flag

Parameters
bool$flagIf this request has been dispatched
Returns
void

Implements RequestInterface.

Definition at line 109 of file extbase/Classes/Mvc/Cli/Request.php.

setExceedingArguments ( array  $exceedingArguments)

Sets the exceeding arguments

Parameters
array$exceedingArgumentsNumeric array of exceeding arguments
Returns
void

Definition at line 270 of file extbase/Classes/Mvc/Cli/Request.php.

References Request\$exceedingArguments.

Member Data Documentation

$arguments = array()
protected
$callingScript
protected
$command = null
protected

Definition at line 72 of file extbase/Classes/Mvc/Cli/Request.php.

Referenced by Request\getCommand().

$commandLineArguments
protected

Definition at line 67 of file extbase/Classes/Mvc/Cli/Request.php.

$controllerCommandName = 'default'
protected
$controllerExtensionName = null
protected
$controllerObjectName
protected
$dispatched = false
protected

Definition at line 62 of file extbase/Classes/Mvc/Cli/Request.php.

Referenced by Request\isDispatched().

$exceedingArguments = array()
protected
$objectManager
protected

Definition at line 28 of file extbase/Classes/Mvc/Cli/Request.php.

Referenced by Request\injectObjectManager().