TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Extbase\Mvc\Controller\Arguments Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Mvc\Controller\Arguments:
Tx_Extbase_MVC_Controller_Arguments

Public Member Functions

 __construct ()
 
 offsetSet ($offset, $value)
 
 append ($value)
 
 offsetUnset ($offset)
 
 offsetExists ($offset)
 
 offsetGet ($offset)
 
 addArgument (\TYPO3\CMS\Extbase\Mvc\Controller\Argument $argument)
 
 getArgument ($argumentName)
 
 hasArgument ($argumentName)
 
 getArgumentNames ()
 
 getArgumentShortNames ()
 
 __call ($methodName, array $arguments)
 
 removeAll ()
 
 getValidationResults ()
 

Protected Member Functions

 translateToLongArgumentName ($argumentName)
 

Protected Attributes

 $objectManager
 
 $argumentNames = array()
 
 $argumentShortNames = array()
 

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! A composite of controller arguments

Definition at line 19 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 40 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 207 of file Arguments.php.

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

◆ addArgument()

TYPO3\CMS\Extbase\Mvc\Controller\Arguments::addArgument ( \TYPO3\CMS\Extbase\Mvc\Controller\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
\TYPO3\CMS\Extbase\Mvc\Controller\Argument$argumentThe argument to add
Returns
void

Definition at line 147 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 69 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
Exceptions

Definition at line 158 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 181 of file Arguments.php.

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

◆ getArgumentShortNames()

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

Returns the short names of all arguments contained in this object that have one.

Returns
array Argument short names

Definition at line 190 of file Arguments.php.

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

◆ getValidationResults()

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

Get all property mapping / validation errors

Returns

Definition at line 261 of file Arguments.php.

◆ 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
boolean TRUE if such an argument exists, otherwise FALSE
See also
offsetExists()

Definition at line 172 of file Arguments.php.

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

◆ offsetExists()

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

Returns whether the requested index exists

Parameters
mixed$offsetOffset
Returns
boolean

Definition at line 97 of file Arguments.php.

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

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
The requested argument object
Exceptions

Definition at line 109 of file Arguments.php.

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

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 53 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 82 of file Arguments.php.

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

◆ removeAll()

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

Remove all arguments and resets this object

Returns
void

Definition at line 249 of file Arguments.php.

◆ translateToLongArgumentName()

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

Translates a short argument name to its corresponding long name. If the specified argument name is a real argument name already, it will be returned again.

If an argument with the specified name or short name does not exist, an empty string is returned.

Parameters
string$argumentNameargument name
Returns
string long argument name or empty string

Definition at line 232 of file Arguments.php.

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

Referenced by TYPO3\CMS\Extbase\Mvc\Controller\Arguments\__call(), TYPO3\CMS\Extbase\Mvc\Controller\Arguments\offsetExists(), TYPO3\CMS\Extbase\Mvc\Controller\Arguments\offsetGet(), and TYPO3\CMS\Extbase\Mvc\Controller\Arguments\offsetUnset().

Member Data Documentation

◆ $argumentNames

TYPO3\CMS\Extbase\Mvc\Controller\Arguments::$argumentNames = array()
protected

Definition at line 30 of file Arguments.php.

◆ $argumentShortNames

TYPO3\CMS\Extbase\Mvc\Controller\Arguments::$argumentShortNames = array()
protected

◆ $objectManager

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

Definition at line 25 of file Arguments.php.