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("]"); }
public function visitConfigCollection(ConfigCollectionBinding $configCollection) { foreach ($configCollection->getElements() as $element) { $element->accept($this); } }