public function parseNodes(array $nodes, Block $block) { $tmp = $this->block; $this->block = $block; foreach ($nodes as $node) { $this->parseNode($node); } $end = $this->block; $this->block = $tmp; return $end; }