PHP 클래스 Phrozn\Processor\Twig

저자: Victor Farazdagi
상속: extends Base, implements Phrozn\Processor
파일 보기 프로젝트 열기: farazdagi/phrozn 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$loader Twig_LoaderInterface Reference to twig current template loader
$twig Twig_Environment Reference to twig engine environment object

공개 메소드들

메소드 설명
__construct ( array $options = [] ) : Twig If configuration options are passed then twig environment is initialized right away
render ( string $tpl, array $vars = [] ) : string Parse the incoming template

보호된 메소드들

메소드 설명
getEnvironment ( boolean $reset = false ) : Twig_Environment Get (init if necessary) twig environment
getLoader ( ) : Twig_LoaderInterface Get template loader chain

메소드 상세

__construct() 공개 메소드

If configuration options are passed then twig environment is initialized right away
public __construct ( array $options = [] ) : Twig
$options array Processor options
리턴 Twig

getEnvironment() 보호된 메소드

Get (init if necessary) twig environment
protected getEnvironment ( boolean $reset = false ) : Twig_Environment
$reset boolean Force re-initialization (helpful for UTs)
리턴 Twig_Environment

getLoader() 보호된 메소드

Get template loader chain
protected getLoader ( ) : Twig_LoaderInterface
리턴 Twig_LoaderInterface

render() 공개 메소드

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
리턴 string Processed template

프로퍼티 상세

$loader 보호되어 있는 프로퍼티

Reference to twig current template loader
protected Twig_LoaderInterface $loader
리턴 Twig_LoaderInterface

$twig 보호되어 있는 프로퍼티

Reference to twig engine environment object
protected Twig_Environment $twig
리턴 Twig_Environment