Arguments extends ArrayObject

A composite of controller arguments

Internal

only to be used within Extbase, not part of TYPO3 Core API.

Table of Contents

Properties

$argumentNames  : array<string|int, mixed>
$argumentShortNames  : array<string|int, mixed>

Methods

__call()  : void
Magic setter method for the argument values. Each argument value can be set by just calling the setArgumentName() method.
__construct()  : mixed
Constructor. If this one is removed, reflection breaks.
addArgument()  : void
Adds the specified controller argument to this composite object.
addNewArgument()  : Argument
Creates, adds and returns a new controller argument to this composite object.
append()  : void
Sets an argument, aliased to offsetSet()
getArgument()  : Argument
Returns an argument specified by name
getArgumentNames()  : array<string|int, mixed>
Returns the names of all arguments contained in this object
getArgumentShortNames()  : array<string|int, mixed>
Returns the short names of all arguments contained in this object that have one.
hasArgument()  : bool
Checks if an argument with the specified name exists
offsetExists()  : bool
offsetGet()  : Argument
Returns the value at the specified index
offsetSet()  : void
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.
offsetUnset()  : void
removeAll()  : void
Remove all arguments and resets this object
validate()  : Result
translateToLongArgumentName()  : string
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.

Properties

$argumentNames

protected array<string|int, mixed> $argumentNames = []

$argumentShortNames

protected array<string|int, mixed> $argumentShortNames = []

Methods

__call()

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

public __call(string $methodName, array<string|int, mixed> $arguments) : void
Parameters
$methodName : string
$arguments : array<string|int, mixed>
Tags
throws
LogicException

__construct()

Constructor. If this one is removed, reflection breaks.

public __construct() : mixed

addArgument()

Adds the specified controller argument to this composite object.

public addArgument(Argument $argument) : void

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 : Argument

addNewArgument()

Creates, adds and returns a new controller argument to this composite object.

public addNewArgument(string $name[, string $dataType = 'Text' ][, bool $isRequired = false ][, mixed $defaultValue = null ]) : Argument

If an argument with the same name exists already, it will be replaced by the new argument object.

Parameters
$name : string
$dataType : string = 'Text'
$isRequired : bool = false
$defaultValue : mixed = null
Return values
Argument

append()

Sets an argument, aliased to offsetSet()

public append(mixed $value) : void
Parameters
$value : mixed
Tags
throws
InvalidArgumentException

if the argument is not a valid Controller Argument object

getArgumentNames()

Returns the names of all arguments contained in this object

public getArgumentNames() : array<string|int, mixed>
Return values
array<string|int, mixed>

getArgumentShortNames()

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

public getArgumentShortNames() : array<string|int, mixed>
Return values
array<string|int, mixed>

hasArgument()

Checks if an argument with the specified name exists

public hasArgument(string $argumentName) : bool
Parameters
$argumentName : string
Tags
see
offsetExists()
Return values
bool

offsetExists()

public offsetExists(mixed $offset) : bool
Parameters
$offset : mixed
Return values
bool

offsetSet()

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.

public offsetSet(mixed $offset, mixed $value) : void
Parameters
$offset : mixed

Offset - not used here

$value : mixed
Tags
throws
InvalidArgumentException

if the argument is not a valid Controller Argument object

offsetUnset()

public offsetUnset(mixed $offset) : void
Parameters
$offset : mixed

removeAll()

Remove all arguments and resets this object

public removeAll() : void

translateToLongArgumentName()

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.

protected translateToLongArgumentName(string $argumentName) : string

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

Parameters
$argumentName : string
Return values
string

        
On this page

Search results