Ejemplo n.º 1
0
 public function __construct()
 {
     parent::__construct();
     $this->_children = array();
 }
Ejemplo n.º 2
0
 /**
  * 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);
     }
 }
Ejemplo n.º 3
0
 private function pushNode(PHPTAL_Dom_Node $node)
 {
     $node->setSource($this->file, $this->line);
     $this->_current->appendChild($node);
 }
Ejemplo n.º 4
0
 private function pushNode(PHPTAL_Dom_Node $node)
 {
     $node->setSource($this->getSourceFile(), $this->getLineNumber());
     $this->_current->addChild($node);
 }