public function __construct() { parent::__construct(); $this->_children = array(); }
/** * recursively generates code for slots */ private function generateFillSlots(PHPTAL_Php_CodeWriter $codewriter, PHPTAL_Dom_Node $phpelement) { if (false == $phpelement instanceof PHPTAL_Dom_Element) { return; } // if the tag contains one of the allowed attribute, we generate it foreach (self::$ALLOWED_ATTRIBUTES as $qname => $uri) { if ($phpelement->hasAttributeNS($uri, $qname)) { $phpelement->generateCode($codewriter); return; } } foreach ($phpelement->childNodes as $child) { $this->generateFillSlots($codewriter, $child); } }
private function pushNode(PHPTAL_Dom_Node $node) { $node->setSource($this->file, $this->line); $this->_current->appendChild($node); }
private function pushNode(PHPTAL_Dom_Node $node) { $node->setSource($this->getSourceFile(), $this->getLineNumber()); $this->_current->addChild($node); }