public function visitConfigCollection(ConfigCollectionBinding $configCollection)
 {
     $elements = $configCollection->getElements();
     foreach ($elements as $name => $element) {
         if ($element instanceof ConfigItemBinding) {
             $elements[$name] = $this->visitConfigItem($element);
         }
     }
     $optimized = new ConfigCollectionBinding($configCollection->getName(), $configCollection->getSource(), $elements);
     $this->bindings->put($optimized);
 }
 public function visitConfigCollection(ConfigCollectionBinding $configCollection)
 {
     $this->writer->write("[");
     $this->writer->indent();
     foreach ($configCollection->getElements() as $name => $element) {
         $this->writer->literal($name);
         $this->writer->write(" => ");
         $element->accept($this);
         $this->writer->writeln(", ");
     }
     $this->writer->outdent();
     $this->writer->write("]");
 }
示例#3
0
 public function visitConfigCollection(ConfigCollectionBinding $configCollection)
 {
     foreach ($configCollection->getElements() as $element) {
         $element->accept($this);
     }
 }