for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Borobudur-Event-Sourcing package.
*
* (c) Hexacodelabs <http://hexacodelabs.com>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Borobudur\EventSourcing\Domain;
use ArrayIterator;
/**
* @author Iqbal Maulana <[email protected]>
* @created 8/20/15
class DomainEventStream implements DomainEventStreamInterface
{
* @var array
private $events = array();
* Constructor.
* @param DomainMessageInterface[] $events
public function __construct(array $events)
$this->events = $events;
}
* {@inheritdoc}
public function all()
return $this->events;
public function getIterator()
return new ArrayIterator($this->events);
public function count()
return count($this->events);