示例#1
0
文件: Node.php 项目: waifei/createphp
 /**
  * {@inheritDoc}
  *
  * @api
  */
 public function renderStart($tag_name = false)
 {
     if (is_string($tag_name)) {
         $this->_tag_name = $tag_name;
     }
     $attributesToSkip = array();
     if ($this->_parent && $this->_parent->isRendering()) {
         //remove about to work around a VIE bug with nested identical about attributes
         $attributesToSkip[] = 'about';
     }
     $template = explode('__CONTENT__', $this->_template);
     $template = $template[0];
     $replace = array("__TAG_NAME__" => $this->_tag_name, " __ATTRIBUTES__" => $this->renderAttributes($attributesToSkip));
     $this->_is_rendering = true;
     return strtr($template, $replace);
 }