render() public method

Parse the incoming template
public render ( string $tpl, array $vars = [] ) : string
$tpl string Source template content
$vars array List of variables passed to template engine
return string Processed template
Beispiel #1
0
 public function testRender()
 {
     $processor = new Processor();
     $tpl = file_get_contents($this->path . 'tpl1.markdown');
     $rendered = $processor->render($tpl);
     $static = file_get_contents($this->path . 'tpl1.markdown.html');
     $this->assertSame(trim($static), trim($rendered));
 }