Example #1
0
 /**
  * 
  * @param View $view
  * @param string $name
  * @param integer $xmlLineNumber
  */
 public function __construct(View &$view, $name, $xmlLineNumber)
 {
     parent::__construct($view);
     $this->name = $name;
     $this->attributes = array();
     $this->runtimeAttributes = array();
     $this->children = array();
     $this->xmlLineNumber = $xmlLineNumber;
 }
Example #2
0
 /**
  * Process parsed source and render view,
  * using the data universe.
  *
  * @return string
  * @throws RenderingException
  */
 public function render()
 {
     if (!$this->bParsed) {
         $this->parse();
     }
     if (null != $this->parentViewElement) {
         $this->rootNode->view =& $this->parentViewElement->view;
     }
     if (!$this->rootNode) {
         throw new XMLParsingException('No template file loaded', '', 0);
     }
     $result = $this->rootNode->render();
     if (!$this->parentViewElement) {
         $result = $this->plugIntoSlots($result);
     }
     // Take care of the doctype at top of output
     if ($this->doctype) {
         $result = '<!doctype ' . $this->doctype . '>' . "\n" . $result;
     }
     return $result;
 }