Example #1
0
 /**
  * @param array $configuration
  *
  * @throws MissingRequiredParameter
  */
 public function configure(array $configuration)
 {
     foreach ($this->requiredParameters as $parameter) {
         if (!isset($configuration[$parameter])) {
             throw new MissingRequiredParameter(sprintf('Required parameter "%s" should be passed to service "%s"', $parameter, self::class));
         }
         $this->configuration->set($parameter, $configuration[$parameter]);
     }
 }
Example #2
0
 public function getParameter($name)
 {
     if (!$this->parameters->get($name)) {
         throw new \Exception(sprintf('Parameter "%s" is undefined', $name));
     }
     return $this->parameters->get($name);
 }
Example #3
0
 public function get($key, $default = null)
 {
     return parent::get(mb_strtolower($key), $default);
 }
Example #4
0
 public function get($name)
 {
     return $this->pages->get($name);
 }