PHP 클래스 Twig_NodeVisitor_Optimizer, php-framework-benchmarks

This visitor is always the last registered one. You can configure which optimizations you want to activate via the optimizer mode.
저자: Fabien Potencier ([email protected])
상속: implements Twig_NodeVisitorInterface
파일 보기 프로젝트 열기: pmjones/php-framework-benchmarks

보호된 프로퍼티들

프로퍼티 타입 설명
$loops
$optimizers

공개 메소드들

메소드 설명
__construct ( integer $optimizers ) Constructor.
enterNode ( Twig_NodeInterface $node, Twig_Environment $env )
getPriority ( )
leaveNode ( Twig_NodeInterface $node, Twig_Environment $env )

보호된 메소드들

메소드 설명
enterOptimizeFor ( $node, $env ) Optimizes "for" tag.
leaveOptimizeFor ( $node, $env )

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( integer $optimizers )
$optimizers integer The optimizer mode

enterNode() 공개 메소드

public enterNode ( Twig_NodeInterface $node, Twig_Environment $env )
$node Twig_NodeInterface
$env Twig_Environment

enterOptimizeFor() 보호된 메소드

This method removes the creation of the "loop" variable when: * "loop" is not used in the "for" tag * and there is no include tag without the "only" attribute * and there is inner-for tag (in which case we would need to check parent.loop usage) This method should be able to optimize for with inner-for tags.
protected enterOptimizeFor ( $node, $env )

getPriority() 공개 메소드

public getPriority ( )

leaveNode() 공개 메소드

public leaveNode ( Twig_NodeInterface $node, Twig_Environment $env )
$node Twig_NodeInterface
$env Twig_Environment

leaveOptimizeFor() 보호된 메소드

protected leaveOptimizeFor ( $node, $env )

프로퍼티 상세

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

protected $loops

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

protected $optimizers