PHP Class Eloquent\Phony\Call\Event\CallEventFactory

Datei anzeigen Open project: eloquent/phony Class Usage Examples

Public Methods

Method Description
__construct ( Sequencer $sequencer, Eloquent\Phony\Clock\Clock $clock ) Construct a new call event factory.
createCalled ( callable $callback, Arguments $arguments ) : CalledEvent Create a new 'called' event.
createConsumed ( ) : ConsumedEvent Create a new 'consumed' event.
createProduced ( mixed $key, mixed $value ) : ProducedEvent Create a new 'produced' event.
createReceived ( mixed $value ) : ReceivedEvent Create a new 'received' event.
createReceivedException ( Exceptio\Exception | Erro\Error $exception ) : ReceivedExceptionEvent Create a new 'received exception' event.
createReturned ( mixed $value ) : ReturnedEvent Create a new 'returned' event.
createThrew ( Exceptio\Exception | Erro\Error $exception ) : ThrewEvent Create a new 'thrown' event.
createUsed ( ) : UsedEvent Create a new 'used' event.
instance ( ) : CallEventFactory Get the static instance of this factory.

Method Details

__construct() public method

Construct a new call event factory.
public __construct ( Sequencer $sequencer, Eloquent\Phony\Clock\Clock $clock )
$sequencer Eloquent\Phony\Sequencer\Sequencer The sequencer to use.
$clock Eloquent\Phony\Clock\Clock The clock to use.

createCalled() public method

Create a new 'called' event.
public createCalled ( callable $callback, Arguments $arguments ) : CalledEvent
$callback callable The callback.
$arguments Eloquent\Phony\Call\Arguments The arguments.
return CalledEvent The newly created event.

createConsumed() public method

Create a new 'consumed' event.
public createConsumed ( ) : ConsumedEvent
return ConsumedEvent The newly created event.

createProduced() public method

Create a new 'produced' event.
public createProduced ( mixed $key, mixed $value ) : ProducedEvent
$key mixed The produced key.
$value mixed The produced value.
return ProducedEvent The newly created event.

createReceived() public method

Create a new 'received' event.
public createReceived ( mixed $value ) : ReceivedEvent
$value mixed The received value.
return ReceivedEvent The newly created event.

createReceivedException() public method

Create a new 'received exception' event.
public createReceivedException ( Exceptio\Exception | Erro\Error $exception ) : ReceivedExceptionEvent
$exception Exceptio\Exception | Erro\Error The received exception.
return ReceivedExceptionEvent The newly created event.

createReturned() public method

Create a new 'returned' event.
public createReturned ( mixed $value ) : ReturnedEvent
$value mixed The return value.
return ReturnedEvent The newly created event.

createThrew() public method

Create a new 'thrown' event.
public createThrew ( Exceptio\Exception | Erro\Error $exception ) : ThrewEvent
$exception Exceptio\Exception | Erro\Error The thrown exception.
return ThrewEvent The newly created event.

createUsed() public method

Create a new 'used' event.
public createUsed ( ) : UsedEvent
return UsedEvent The newly created event.

instance() public static method

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