private function evaluateConditions(callable $conditions) { $evaluatedConditions = []; foreach ($this->store->allEvents() as $event) { $evaluatedConditions[] = $this->evaluateConditionsFor($conditions, $event); } return $evaluatedConditions; }
/** * @param mixed|null $query * @return object * @throws \Exception */ public function project($query = null) { $projection = $this->projections->buildProjection($query); if (!is_object($projection)) { throw new \Exception('Projection must be an object.'); } $this->applyEvents($projection, $this->store->allEvents()); return $projection; }
public function appendedEvents() { return $this->store->allEvents(); }