예제 #1
0
 public function visitCollection(CollectionBinding $collection)
 {
     $this->writer->write("[");
     $elements = $collection->getElements();
     if ($elements) {
         $this->writer->indent();
         foreach ($elements as $element) {
             $element->accept($this);
             $this->writer->writeln(", ");
         }
         $this->writer->outdent();
     }
     $this->writer->write("]");
 }
예제 #2
0
 public function visitCollection(CollectionBinding $collection)
 {
     foreach ($collection->getElements() as $element) {
         $element->accept($this);
     }
 }