PHP Class Prooph\EventStore\EventStore

Author: Alexander Miertsch ([email protected])
Datei anzeigen Open project: prooph/event-store Class Usage Examples

Protected Properties

Property Type Description
$actionEventEmitter Prooph\Common\Event\ActionEventEmitter
$adapter Prooph\EventStore\Adapter\Adapter
$inTransaction boolean
$recordedEvents Iterator

Public Methods

Method Description
__construct ( Prooph\EventStore\Adapter\Adapter $adapter, Prooph\Common\Event\ActionEventEmitter $actionEventEmitter ) Constructor
appendTo ( StreamName $streamName, Iterator $streamEvents ) : void
beginTransaction ( ) Begin transaction
commit ( ) Commit transaction
create ( Stream $stream ) : void
getActionEventEmitter ( ) : Prooph\Common\Event\ActionEventEmitter
getAdapter ( ) : Prooph\EventStore\Adapter\Adapter Get the active EventStoreAdapter
getRecordedEvents ( ) : Iterator
isInTransaction ( ) : boolean
load ( StreamName $streamName, null | integer $minVersion = null ) : Stream
loadEventsByMetadataFrom ( StreamName $streamName, array $metadata, null | integer $minVersion = null ) : Iterator
replay ( array $streamNames, DateTimeInterface $since = null, array $metadatas = null ) : CompositeIterator
rollback ( ) Rollback transaction
transactional ( callable $callable ) : mixed

Method Details

__construct() public method

Constructor
public __construct ( Prooph\EventStore\Adapter\Adapter $adapter, Prooph\Common\Event\ActionEventEmitter $actionEventEmitter )
$adapter Prooph\EventStore\Adapter\Adapter
$actionEventEmitter Prooph\Common\Event\ActionEventEmitter

appendTo() public method

public appendTo ( StreamName $streamName, Iterator $streamEvents ) : void
$streamName Prooph\EventStore\Stream\StreamName
$streamEvents Iterator
return void

beginTransaction() public method

Begin transaction
public beginTransaction ( )

commit() public method

Commit transaction
public commit ( )

create() public method

public create ( Stream $stream ) : void
$stream Prooph\EventStore\Stream\Stream
return void

getActionEventEmitter() public method

public getActionEventEmitter ( ) : Prooph\Common\Event\ActionEventEmitter
return Prooph\Common\Event\ActionEventEmitter

getAdapter() public method

Get the active EventStoreAdapter
public getAdapter ( ) : Prooph\EventStore\Adapter\Adapter
return Prooph\EventStore\Adapter\Adapter

getRecordedEvents() public method

public getRecordedEvents ( ) : Iterator
return Iterator

isInTransaction() public method

public isInTransaction ( ) : boolean
return boolean

load() public method

public load ( StreamName $streamName, null | integer $minVersion = null ) : Stream
$streamName Prooph\EventStore\Stream\StreamName
$minVersion null | integer
return Prooph\EventStore\Stream\Stream

loadEventsByMetadataFrom() public method

public loadEventsByMetadataFrom ( StreamName $streamName, array $metadata, null | integer $minVersion = null ) : Iterator
$streamName Prooph\EventStore\Stream\StreamName
$metadata array
$minVersion null | integer
return Iterator

replay() public method

public replay ( array $streamNames, DateTimeInterface $since = null, array $metadatas = null ) : CompositeIterator
$streamNames array
$since DateTimeInterface
$metadatas array One metadata array per stream name, same index order is required
return Prooph\EventStore\Util\CompositeIterator

rollback() public method

Rollback transaction
public rollback ( )

transactional() public method

public transactional ( callable $callable ) : mixed
$callable callable
return mixed

Property Details

$actionEventEmitter protected_oe property

protected ActionEventEmitter,Prooph\Common\Event $actionEventEmitter
return Prooph\Common\Event\ActionEventEmitter

$adapter protected_oe property

protected Adapter,Prooph\EventStore\Adapter $adapter
return Prooph\EventStore\Adapter\Adapter

$inTransaction protected_oe property

protected bool $inTransaction
return boolean

$recordedEvents protected_oe property

protected Iterator $recordedEvents
return Iterator