PHP 클래스 Tale\Jade\Renderer\Adapter\Stream

상속: extends Tale\Jade\Renderer\AdapterBase
파일 보기 프로젝트 열기: talesoft/tale-jade

공개 메소드들

메소드 설명
__construct ( Renderer $renderer, array $options = null ) Creates a new stream adapter.
render ( string $path, array $args = null ) : string Renders a jade file by a given path.

메소드 상세

__construct() 공개 메소드

Possible options are: scheme: The scheme to register the wrapper as (default: 'jade-phtml') If the stream wrapper with the given name is not registered yet, it is registered The stream wrapper used is \Tale\Jade\Renderer\Adapter\Stream\Wrapper
public __construct ( Renderer $renderer, array $options = null )
$renderer Tale\Jade\Renderer the renderer instance this adapter was created in
$options array an array of options for the adapter

render() 공개 메소드

The extension can be omitted if it's the extension set in the Compiler-options ('.jade' by default) The given $args-argument should be an associative array and will be passed as variables that you can use inside the rendered template file Notice that the path is relative to the Compiler-option 'paths' or, if no paths passed, the paths in get_include_path() You might just echo the result, cache it or do anything else with it
public render ( string $path, array $args = null ) : string
$path string the relative path to be rendered
$args array the variables for the template
리턴 string the rendered markup