コード例 #1
0
 public function prepareDisplay($tmp = 'main')
 {
     //First we prepare the page
     $this->_prepareDisplay();
     //Then display the template
     ob_start();
     //try{
     //Including The template
     include OWEB_DIR_TEMPLATES . "/" . $tmp . ".php";
     $foo = ob_get_contents();
     //Clean
     ob_end_clean();
     $ml = new Manialink();
     $ml->setVersion(2);
     Timeout::create()->setNodeValue(0)->appendTo($ml);
     Fragment::create()->setNodeValue($foo)->appendTo($ml);
     $this->scripts->appendScripts($ml);
     header('Content-Type: application/xml; charset=utf-8');
     $renderer = new Renderer();
     $renderer->setRoot($ml);
     echo $renderer->getXML();
 }