PHP Class Eloquent\Phony\Call\Arguments

Inheritance: implements Countabl\Countable, implements IteratorAggregat\IteratorAggregate
Datei anzeigen Open project: eloquent/phony Class Usage Examples

Public Methods

Method Description
__construct ( array $arguments ) Construct a new set of call arguments.
all ( ) : array Get the arguments.
copy ( ) : Arguments Copy these arguments, breaking any references.
count ( ) : integer Get the number of arguments.
create ( ) : Arguments Create a new set of call arguments from the supplied arguments.
get ( integer $index ) : mixed Get an argument by index.
getIterator ( ) : Iterator Get an iterator for these arguments.
has ( integer $index ) : boolean Returns true if the argument index exists.
set ( mixed $indexOrValue = null, mixed $value = null ) Set an argument by index.

Private Methods

Method Description
normalizeIndex ( $size, $index, &$normalized = null )

Method Details

__construct() public method

Construct a new set of call arguments.
public __construct ( array $arguments )
$arguments array The arguments.

all() public method

This method supports reference parameters.
public all ( ) : array
return array

copy() public method

Copy these arguments, breaking any references.
public copy ( ) : Arguments
return Arguments The copied arguments.

count() public method

Get the number of arguments.
public count ( ) : integer
return integer The number of arguments.

create() public static method

Create a new set of call arguments from the supplied arguments.
public static create ( ) : Arguments
return Arguments The arguments object.

get() public method

Negative indices are offset from the end of the list. That is, -1 indicates the last element, and -2 indicates the second last element.
public get ( integer $index ) : mixed
$index integer The index.
return mixed The argument.

getIterator() public method

Get an iterator for these arguments.
public getIterator ( ) : Iterator
return Iterator The iterator.

has() public method

Negative indices are offset from the end of the list. That is, -1 indicates the last element, and -2 indicates the second last element.
public has ( integer $index ) : boolean
$index integer The index.
return boolean True if the argument exists.

set() public method

If called with no arguments, sets the first argument to null. If called with one argument, sets the first argument to $indexOrValue. If called with two arguments, sets the argument at $indexOrValue to $value.
public set ( mixed $indexOrValue = null, mixed $value = null )
$indexOrValue mixed The index, or value if no index is specified.
$value mixed The value.