Tale\Jade\Renderer::render PHP Method

render() public method

This is the essence of the Jade-renderer and is the shortest and easiest way to get Jade running in your project Notice that if your file couldn't found, you need to pass _relative_ paths. The paths will be relative from the compiler:paths option or from get_include_path(), if no paths have been defined
public render ( string $file, array $args = null ) : string
$file string the relative path to the file to render
$args array an array of variables to pass to the Jade-file
return string The renderered markup
    public function render($file, array $args = null)
    {
        return $this->getAdapter()->render($file, $args);
    }

Usage Example

コード例 #1
0
ファイル: IssueTest.php プロジェクト: marihachi/tale-jade
 public function testIssue48()
 {
     $this->assertEquals('<h2>Hello</h2>', $this->renderer->render('issue-48/1'));
     $this->assertEquals(' <button>Submit</button>', $this->renderer->render('issue-48/views/view.ctp'));
     $this->assertEquals('<div id="clip_1"></div>', $this->renderer->render('issue-48/escaping', ['clipId' => 1]));
 }
All Usage Examples Of Tale\Jade\Renderer::render