コード例 #1
0
 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);
 }
コード例 #2
0
 /**
  * @param string $name
  *
  * @return \Svycka\Settings\Collection\CollectionInterface
  */
 public function getCollection($name)
 {
     return $this->collections->get($name);
 }