Phrozn\Processor\Less::render PHP Method

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
    public function render($tpl, $vars = array())
    {
        return $this->getEnvironment()->parse($tpl);
    }

Usage Example

Exemplo n.º 1
0
 public function testRenderImportLessDirective()
 {
     $tpl = file_get_contents($this->path . 'tpl2.less');
     $expectedResult = file_get_contents($this->path . 'tpl1.css');
     $processor = new Processor();
     $processor->setConfig(array('phr_template_dir' => $this->path));
     $rendered = $processor->render($tpl);
     $this->assertSame(trim($rendered), trim($expectedResult));
 }
All Usage Examples Of Phrozn\Processor\Less::render