コード例 #1
0
 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);
 }
コード例 #2
0
 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);
     }
 }