TYPO3 CMS  TYPO3_7-6
TYPO3\CMS\Extbase\Mvc\Controller\Arguments Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Mvc\Controller\Arguments:

Public Member Functions

 injectObjectManager (\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager)
 
 __construct ()
 
 offsetSet ($offset, $value)
 
 append ($value)
 
 offsetUnset ($offset)
 
 offsetExists ($offset)
 
 offsetGet ($offset)
 
 addArgument (Argument $argument)
 
 getArgument ($argumentName)
 
 hasArgument ($argumentName)
 
 getArgumentNames ()
 
 __call ($methodName, array $arguments)
 
 removeAll ()
 

Protected Attributes

 $objectManager
 
 $argumentNames = []
 
 $argumentShortNames = []
 

Detailed Description

A composite of controller arguments

Definition at line 20 of file Arguments.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Extbase\Mvc\Controller\Arguments::__construct ( )

Constructor. If this one is removed, reflection breaks.

Definition at line 48 of file Arguments.php.

Member Function Documentation

◆ __call()

TYPO3\CMS\Extbase\Mvc\Controller\Arguments::__call (   $methodName,
array  $arguments 
)

Magic setter method for the argument values. Each argument value can be set by just calling the setArgumentName() method.

Parameters
string$methodNameName of the method
array$argumentsMethod arguments
Exceptions

Definition at line 228 of file Arguments.php.

References TYPO3\CMS\Extbase\Mvc\Controller\Arguments\getArgumentNames().

◆ addArgument()

TYPO3\CMS\Extbase\Mvc\Controller\Arguments::addArgument ( Argument  $argument)

Adds the specified controller argument to this composite object. If an argument with the same name exists already, it will be replaced by the new argument object.

Note that the argument will be cloned, not referenced.

Parameters
Argument$argumentThe argument to add
Returns
void

Definition at line 162 of file Arguments.php.

References TYPO3\CMS\Extbase\Mvc\Controller\Arguments\offsetSet().

Referenced by TYPO3\CMS\Extbase\Mvc\Controller\Arguments\offsetGet().

◆ append()

TYPO3\CMS\Extbase\Mvc\Controller\Arguments::append (   $value)

Sets an argument, aliased to offsetSet()

Parameters
mixed$valueThe value
Exceptions

Definition at line 79 of file Arguments.php.

References TYPO3\CMS\Extbase\Mvc\Controller\Arguments\offsetSet().

◆ getArgument()

TYPO3\CMS\Extbase\Mvc\Controller\Arguments::getArgument (   $argumentName)

Returns an argument specified by name

Parameters
string$argumentNameName of the argument to retrieve
Returns
Argument
Exceptions

Definition at line 174 of file Arguments.php.

References TYPO3\CMS\Extbase\Mvc\Controller\Arguments\offsetExists(), and TYPO3\CMS\Extbase\Mvc\Controller\Arguments\offsetGet().

◆ getArgumentNames()

TYPO3\CMS\Extbase\Mvc\Controller\Arguments::getArgumentNames ( )

Returns the names of all arguments contained in this object

Returns
array Argument names

Definition at line 199 of file Arguments.php.

References TYPO3\CMS\Extbase\Mvc\Controller\Arguments\$argumentShortNames.

Referenced by TYPO3\CMS\Extbase\Mvc\Controller\Arguments\__call().

◆ hasArgument()

TYPO3\CMS\Extbase\Mvc\Controller\Arguments::hasArgument (   $argumentName)

Checks if an argument with the specified name exists

Parameters
string$argumentNameName of the argument to check for
Returns
bool TRUE if such an argument exists, otherwise FALSE
See also
offsetExists()

Definition at line 189 of file Arguments.php.

References TYPO3\CMS\Extbase\Mvc\Controller\Arguments\offsetExists().

◆ injectObjectManager()

TYPO3\CMS\Extbase\Mvc\Controller\Arguments::injectObjectManager ( \TYPO3\CMS\Extbase\Object\ObjectManagerInterface  $objectManager)
Parameters
\TYPO3\CMS\Extbase\Object\ObjectManagerInterface$objectManager

Definition at line 40 of file Arguments.php.

References TYPO3\CMS\Extbase\Mvc\Controller\Arguments\$objectManager.

◆ offsetExists()

TYPO3\CMS\Extbase\Mvc\Controller\Arguments::offsetExists (   $offset)

Returns whether the requested index exists

Parameters
mixed$offsetOffset
Returns
bool

Definition at line 109 of file Arguments.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Controller\Arguments\getArgument(), and TYPO3\CMS\Extbase\Mvc\Controller\Arguments\hasArgument().

◆ offsetGet()

TYPO3\CMS\Extbase\Mvc\Controller\Arguments::offsetGet (   $offset)

Returns the value at the specified index

Parameters
mixed$offsetOffset
Returns
Argument The requested argument object
Exceptions

Definition at line 122 of file Arguments.php.

References TYPO3\CMS\Extbase\Mvc\Controller\Arguments\addArgument().

Referenced by TYPO3\CMS\Extbase\Mvc\Controller\Arguments\getArgument().

◆ offsetSet()

TYPO3\CMS\Extbase\Mvc\Controller\Arguments::offsetSet (   $offset,
  $value 
)

Adds or replaces the argument specified by $value. The argument's name is taken from the argument object itself, therefore the $offset does not have any meaning in this context.

Parameters
mixed$offsetOffset - not used here
mixed$valueThe argument
Exceptions

Definition at line 62 of file Arguments.php.

Referenced by TYPO3\CMS\Extbase\Mvc\Controller\Arguments\addArgument(), and TYPO3\CMS\Extbase\Mvc\Controller\Arguments\append().

◆ offsetUnset()

TYPO3\CMS\Extbase\Mvc\Controller\Arguments::offsetUnset (   $offset)

Unsets an argument

Parameters
mixed$offsetOffset
Returns
void

Definition at line 93 of file Arguments.php.

◆ removeAll()

TYPO3\CMS\Extbase\Mvc\Controller\Arguments::removeAll ( )

Remove all arguments and resets this object

Returns
void

Definition at line 273 of file Arguments.php.

Member Data Documentation

◆ $argumentNames

TYPO3\CMS\Extbase\Mvc\Controller\Arguments::$argumentNames = []
protected

Definition at line 30 of file Arguments.php.

◆ $argumentShortNames

TYPO3\CMS\Extbase\Mvc\Controller\Arguments::$argumentShortNames = []
protected

◆ $objectManager

TYPO3\CMS\Extbase\Mvc\Controller\Arguments::$objectManager
protected