PHP Class Eloquent\Phony\Spy\IterableSpyFactory

Show file Open project: eloquent/phony Class Usage Examples

Public Methods

Method Description
__construct ( CallEventFactory $callEventFactory ) Construct a new iterable spy factory.
create ( Eloquent\Phony\Call\Call $call, Traversabl\Traversable | array $iterable ) : Traversable Create a new iterable spy.
instance ( ) : IterableSpyFactory Get the static instance of this factory.

Method Details

__construct() public method

Construct a new iterable spy factory.
public __construct ( CallEventFactory $callEventFactory )
$callEventFactory Eloquent\Phony\Call\Event\CallEventFactory The call event factory to use.

create() public method

Create a new iterable spy.
public create ( Eloquent\Phony\Call\Call $call, Traversabl\Traversable | array $iterable ) : Traversable
$call Eloquent\Phony\Call\Call The call from which the iterable originated.
$iterable Traversabl\Traversable | array The iterable.
return Traversable The newly created iterable spy.

instance() public static method

Get the static instance of this factory.
public static instance ( ) : IterableSpyFactory
return IterableSpyFactory The static factory.