PHP Class Eloquent\Phony\Spy\ArraySpy

Inheritance: implements Eloquent\Phony\Spy\IterableSpy
Show file Open project: eloquent/phony

Public Methods

Method Description
__construct ( Eloquent\Phony\Call\Call $call, array $array, CallEventFactory $callEventFactory ) Construct a new array spy.
count ( ) : integer Get the count.
current ( ) : mixed Get the current value.
iterable ( ) : mixed Get the original iterable value.
key ( ) : mixed Get the current key.
next ( ) Move the current position to the next element.
offsetExists ( mixed $key ) : boolean Check if a key exists.
offsetGet ( mixed $key ) : mixed Get a value.
offsetSet ( mixed $key, mixed $value ) Set a value.
offsetUnset ( mixed $key ) Un-set a value.
rewind ( ) Rewind the iterator.
valid ( ) : boolean Returns true if the current iterator position is valid.

Method Details

__construct() public method

Construct a new array spy.
public __construct ( Eloquent\Phony\Call\Call $call, array $array, CallEventFactory $callEventFactory )
$call Eloquent\Phony\Call\Call The call from which the array originated.
$array array The array.
$callEventFactory Eloquent\Phony\Call\Event\CallEventFactory The call event factory to use.

count() public method

Get the count.
public count ( ) : integer
return integer The count.

current() public method

Get the current value.
public current ( ) : mixed
return mixed The current value.

iterable() public method

Get the original iterable value.
public iterable ( ) : mixed
return mixed The original value.

key() public method

Get the current key.
public key ( ) : mixed
return mixed The current key.

next() public method

Move the current position to the next element.
public next ( )

offsetExists() public method

Check if a key exists.
public offsetExists ( mixed $key ) : boolean
$key mixed The key.
return boolean True if the key exists.

offsetGet() public method

Get a value.
public offsetGet ( mixed $key ) : mixed
$key mixed The key.
return mixed The value.

offsetSet() public method

Set a value.
public offsetSet ( mixed $key, mixed $value )
$key mixed The key.
$value mixed The value.

offsetUnset() public method

Un-set a value.
public offsetUnset ( mixed $key )
$key mixed The key.

rewind() public method

Rewind the iterator.
public rewind ( )

valid() public method

Returns true if the current iterator position is valid.
public valid ( ) : boolean
return boolean True if the current iterator position is valid.