Sha256: 6d76c3930c3e4f6a22895808d0e4260edbe3cab03db9f4f563d37e98121ab3c4
Contents?: true
Size: 1.53 KB
Versions: 10
Compression:
Stored size: 1.53 KB
Contents
<?php namespace MtHaml\Node; use MtHaml\NodeVisitor\NodeVisitorInterface; /** * Run Node * * Represents code to execute. If there is children, the node should be * rendered as a block (the renderer should emit a properly closed block). */ class Run extends NestAbstract { private $midblock; public function __construct(array $position, $content) { parent::__construct($position); $this->setContent($content); } public function allowsNestingAndContent() { return true; } public function getNodeName() { return 'exec'; } public function setMidblock(Run $midblock = null) { $this->midblock = $midblock; } public function getMidblock() { return $this->midblock; } public function hasMidblock() { return null !== $this->midblock; } public function isBlock() { return $this->hasChilds() || $this->hasMidblock(); } public function accept(NodeVisitorInterface $visitor) { if (false !== $visitor->enterRun($this)) { if (false !== $visitor->enterRunChilds($this)) { $this->visitChilds($visitor); } $visitor->leaveRunChilds($this); if (false !== $visitor->enterRunMidblock($this)) { if (null !== $block = $this->getMidblock()) { $block->accept($visitor); } } $visitor->leaveRunMidblock($this); } $visitor->leaveRun($this); } }
Version data entries
10 entries across 10 versions & 1 rubygems