PHP Class Eloquent\Phony\Spy\GeneratorSpyFactory

Show file Open project: eloquent/phony Class Usage Examples

Public Methods

Method Description
__construct ( CallEventFactory $callEventFactory, FeatureDetector $featureDetector ) Construct a new generator spy factory.
create ( Eloquent\Phony\Call\Call $call, Generator $generator ) : Generator Create a new generator spy.
instance ( ) : GeneratorSpyFactory Get the static instance of this factory.

Method Details

__construct() public method

Construct a new generator spy factory.
public __construct ( CallEventFactory $callEventFactory, FeatureDetector $featureDetector )
$callEventFactory Eloquent\Phony\Call\Event\CallEventFactory The call event factory to use.
$featureDetector Eloquent\Phony\Reflection\FeatureDetector The feature detector to use.

create() public method

Create a new generator spy.
public create ( Eloquent\Phony\Call\Call $call, Generator $generator ) : Generator
$call Eloquent\Phony\Call\Call The call from which the generator originated.
$generator Generator The generator.
return Generator The newly created generator spy.

instance() public static method

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