private function createTargetFromClassPath($target, Request $request, Path $currentContext) { $path = $currentContext->appended($target); if ($this->store->has($path . '.php')) { $fullClassName = implode('\\', $path->getElements()); if ($this->namespace) { $fullClassName = rtrim($this->namespace, '\\') . '\\' . trim($fullClassName, '\\'); } if (class_exists($fullClassName)) { return $this->createTargetFromClass($fullClassName, $request, $currentContext); } } return null; }
/** * @param mixed $event * @param mixed $aggregateIdentifier */ public function append($event, $aggregateIdentifier) { $events = $this->eventsOf($aggregateIdentifier); $events[] = $event; $this->store->write($events, $aggregateIdentifier); }