public function onDispatch(MvcEvent $event) { $collection = $this->params()->fromRoute('collection'); if (!$this->settingsManager->has($collection)) { return new ApiProblemResponse(new ApiProblem(404, 'Settings collection not found.')); } $this->settings = $this->settingsManager->get($collection); return parent::onDispatch($event); }
/** * @param string $name * * @return \Svycka\Settings\Collection\CollectionInterface */ public function getCollection($name) { return $this->collections->get($name); }