Example #1
0
 protected function walkBlock(BlockNode $block)
 {
     return implode("", $this->walkEach($block->getBody()));
 }
 protected function walkBlock(BlockNode $block)
 {
     $this->walkEach($block->getBody());
 }
 protected function walkBlock(BlockNode $block)
 {
     if (!isset($this->replacingBlocks[$block->getName()])) {
         return new BlockNode($block->getName(), null, null, $this->walkEach($block->getBody()), $block->getFileName(), $block->getRow(), $block->getColumn());
     } else {
         $replacingBlock = $this->replacingBlocks[$block->getName()];
         if ($replacingBlock->getAppend()) {
             return new BlockNode($block->getName(), null, null, array_merge($this->walkEach($replacingBlock->getBody()), $this->walkEach($block->getBody())), $replacingBlock->getFileName(), $replacingBlock->getRow(), $replacingBlock->getColumn());
         } elseif ($replacingBlock->getPrepend()) {
             return new BlockNode($block->getName(), null, null, array_merge($this->walkEach($block->getBody()), $this->walkEach($replacingBlock->getBody())), $replacingBlock->getFileName(), $replacingBlock->getRow(), $replacingBlock->getColumn());
         } else {
             return new BlockNode($block->getName(), null, null, $this->walkEach($replacingBlock->getBody()), $replacingBlock->getFileName(), $replacingBlock->getRow(), $replacingBlock->getColumn());
         }
     }
 }
 protected function walkBlock(BlockNode $block)
 {
     $variableNames = array();
     foreach ($block->getBody() as $statement) {
         foreach ($this->walk($statement) as $name => $_) {
             $variableNames[$name] = true;
         }
     }
     return $variableNames;
 }