Exemplo n.º 1
0
 /**
  * @dataProvider examplesAndDriversProvider
  */
 public function testExample(DriverInterface $driver, NodeInterface $node, $expectedResult)
 {
     $this->renderer->setRoot($node);
     $driver->setEventDispatcher($this->renderer->getEventDispatcher());
     $this->renderer->setDriver($driver);
     $this->assertXmlStringEqualsXmlFile($expectedResult, $this->renderer->getXML());
 }
Exemplo n.º 2
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();
 }