public function visitConfigItem(ConfigItemBinding $configItem)
 {
     foreach ($configItem->getDependencies() as $dependency) {
         try {
             $dependency->accept($this);
         } catch (ConfigurationException $e) {
             throw new ConfigurationException($e->getMessage() . ", required by config " . $configItem->getKey()->getQualifier() . " in " . $configItem->getSource());
         }
     }
 }
 public function visitConfigItem(ConfigItemBinding $configItem)
 {
     $dependencies = $configItem->getDependencies();
     $last = array_pop($dependencies);
     foreach ($dependencies as $dependency) {
         $dependency->accept($this);
         $this->writer->write(".");
     }
     $last->accept($this);
 }
 public function visitConfigItem(ConfigItemBinding $configItem)
 {
     $dependencies = $this->optimize($configItem->getDependencies());
     if (count($dependencies) == 1) {
         $optimized = new ConstantValueBinding($configItem->getKey(), reset($dependencies)->getValue());
     } else {
         $optimized = new ConfigItemBinding($configItem->getName(), $configItem->getSource(), $dependencies);
     }
     $this->bindings->put($optimized);
     return $optimized;
 }
Example #4
0
 public function visitConfigItem(ConfigItemBinding $configItem)
 {
     foreach ($configItem->getDependencies() as $dependency) {
         $dependency->accept($this);
     }
 }