Example #1
0
 public function testIterateOverAppended()
 {
     $event = $this->getMock(DomainEvent::class);
     $collection = new EventCollection();
     $collection->append($event);
     foreach ($collection as $i => $element) {
         $this->assertEquals(0, $i);
         $this->assertSame($event, $element);
     }
 }
Example #2
0
 /**
  * Provides a complete list of all lifecycle events provided by the set providers.
  *
  * @return EventCollectionInterface
  */
 public function getEvents()
 {
     $collection = new EventCollection();
     foreach ($this->providers as $eachProvider) {
         foreach ($eachProvider->getEvents() as $eachEvent) {
             $collection->addEvent($eachEvent);
         }
     }
     return $collection;
 }
Example #3
0
 function __construct(Mapper $mapper, \PDOStatement $stmt_handle, array $valueArray)
 {
     parent::__construct(null, $mapper);
     $this->stmt = $stmt_handle;
     $this->valueArray = $valueArray;
 }
Example #4
0
 function __construct(DomainObjectFactory $dofact, PDOStatement $stmt_handle, array $valueArray)
 {
     parent::__construct(null, $dofact);
     $this->stmt = $stmt_handle;
     $this->valueArray = $valueArray;
 }