TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Extbase\Mvc\Cli\Request Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Mvc\Cli\Request:
TYPO3\CMS\Extbase\Mvc\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 = []
 
 $exceedingArguments = []
 
 $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 Request.php.

Member Function Documentation

◆ getArgument()

TYPO3\CMS\Extbase\Mvc\Cli\Request::getArgument (   $argumentName)

Returns the value of the specified argument

Parameters
string$argumentNameName of the argument
Returns
string Value of the argument
Exceptions

Implements TYPO3\CMS\Extbase\Mvc\RequestInterface.

Definition at line 235 of file Request.php.

◆ getArguments()

TYPO3\CMS\Extbase\Mvc\Cli\Request::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 TYPO3\CMS\Extbase\Mvc\RequestInterface.

Definition at line 259 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Cli\Request\$arguments.

◆ getCallingScript()

TYPO3\CMS\Extbase\Mvc\Cli\Request::getCallingScript ( )
Returns
string

Definition at line 98 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Cli\Request\$callingScript.

◆ getCommand()

TYPO3\CMS\Extbase\Mvc\Cli\Request::getCommand ( )

Returns the command object for this request

Returns

Definition at line 192 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Cli\Request\$command.

◆ getControllerCommandName()

TYPO3\CMS\Extbase\Mvc\Cli\Request::getControllerCommandName ( )

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

Returns
string Command name

Definition at line 182 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Cli\Request\$controllerCommandName.

◆ getControllerExtensionName()

TYPO3\CMS\Extbase\Mvc\Cli\Request::getControllerExtensionName ( )

Returns the extension name of the specified controller.

Returns
string The extension name

Definition at line 158 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Cli\Request\$controllerExtensionName.

◆ getControllerObjectName()

TYPO3\CMS\Extbase\Mvc\Cli\Request::getControllerObjectName ( )

Returns the object name of the controller

Returns
string The controller's object name

Implements TYPO3\CMS\Extbase\Mvc\RequestInterface.

Definition at line 148 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Cli\Request\$controllerObjectName.

◆ getExceedingArguments()

TYPO3\CMS\Extbase\Mvc\Cli\Request::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 Request.php.

References TYPO3\CMS\Extbase\Mvc\Cli\Request\$exceedingArguments.

◆ hasArgument()

TYPO3\CMS\Extbase\Mvc\Cli\Request::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 TYPO3\CMS\Extbase\Mvc\RequestInterface.

Definition at line 249 of file Request.php.

◆ injectObjectManager()

TYPO3\CMS\Extbase\Mvc\Cli\Request::injectObjectManager ( \TYPO3\CMS\Extbase\Object\ObjectManagerInterface  $objectManager)
Parameters
\TYPO3\CMS\Extbase\Object\ObjectManagerInterface$objectManager

Definition at line 82 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Cli\Request\$objectManager.

◆ isDispatched()

TYPO3\CMS\Extbase\Mvc\Cli\Request::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 TYPO3\CMS\Extbase\Mvc\RequestInterface.

Definition at line 123 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Cli\Request\$dispatched.

◆ setArgument()

TYPO3\CMS\Extbase\Mvc\Cli\Request::setArgument (   $argumentName,
  $value 
)

Sets the value of the specified argument

Parameters
string$argumentNameName of the argument to set
mixed$valueThe new value
Exceptions

Implements TYPO3\CMS\Extbase\Mvc\RequestInterface.

Definition at line 208 of file Request.php.

◆ setArguments()

TYPO3\CMS\Extbase\Mvc\Cli\Request::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 TYPO3\CMS\Extbase\Mvc\RequestInterface.

Definition at line 223 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Cli\Request\$arguments.

◆ setCallingScript()

TYPO3\CMS\Extbase\Mvc\Cli\Request::setCallingScript (   $callingScript)
Parameters
string$callingScript

Definition at line 90 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Cli\Request\$callingScript.

◆ setControllerCommandName()

TYPO3\CMS\Extbase\Mvc\Cli\Request::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 Request.php.

◆ setControllerObjectName()

TYPO3\CMS\Extbase\Mvc\Cli\Request::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 Request.php.

References TYPO3\CMS\Extbase\Mvc\Cli\Request\$controllerObjectName, and TYPO3\CMS\Core\Utility\ClassNamingUtility\explodeObjectControllerName().

◆ setDispatched()

TYPO3\CMS\Extbase\Mvc\Cli\Request::setDispatched (   $flag)

Sets the dispatched flag

Parameters
bool$flagIf this request has been dispatched
Returns
void

Implements TYPO3\CMS\Extbase\Mvc\RequestInterface.

Definition at line 109 of file Request.php.

◆ setExceedingArguments()

TYPO3\CMS\Extbase\Mvc\Cli\Request::setExceedingArguments ( array  $exceedingArguments)

Sets the exceeding arguments

Parameters
array$exceedingArgumentsNumeric array of exceeding arguments
Returns
void

Definition at line 270 of file Request.php.

References TYPO3\CMS\Extbase\Mvc\Cli\Request\$exceedingArguments.

Member Data Documentation

◆ $arguments

TYPO3\CMS\Extbase\Mvc\Cli\Request::$arguments = []
protected

◆ $callingScript

TYPO3\CMS\Extbase\Mvc\Cli\Request::$callingScript
protected

◆ $command

TYPO3\CMS\Extbase\Mvc\Cli\Request::$command = null
protected

Definition at line 72 of file Request.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Cli\Request\getCommand().

◆ $commandLineArguments

TYPO3\CMS\Extbase\Mvc\Cli\Request::$commandLineArguments
protected

Definition at line 67 of file Request.php.

◆ $controllerCommandName

TYPO3\CMS\Extbase\Mvc\Cli\Request::$controllerCommandName = 'default'
protected

◆ $controllerExtensionName

TYPO3\CMS\Extbase\Mvc\Cli\Request::$controllerExtensionName = null
protected

◆ $controllerObjectName

TYPO3\CMS\Extbase\Mvc\Cli\Request::$controllerObjectName
protected

◆ $dispatched

TYPO3\CMS\Extbase\Mvc\Cli\Request::$dispatched = false
protected

Definition at line 62 of file Request.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Cli\Request\isDispatched().

◆ $exceedingArguments

TYPO3\CMS\Extbase\Mvc\Cli\Request::$exceedingArguments = []
protected

◆ $objectManager

TYPO3\CMS\Extbase\Mvc\Cli\Request::$objectManager
protected

Definition at line 28 of file Request.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Cli\Request\injectObjectManager().