PEEL Shopping
Open source ecommerce : PEEL Shopping
|
Twig_NodeVisitor_Optimizer tries to optimizes the AST. More...
Public Member Functions | |||||||
__construct ($optimizers=-1) | |||||||
Constructor. More... | |||||||
enterNode (Twig_NodeInterface $node, Twig_Environment $env) | |||||||
{Called before child nodes are visited.
| |||||||
leaveNode (Twig_NodeInterface $node, Twig_Environment $env) | |||||||
{Called after child nodes are visited.
| |||||||
getPriority () | |||||||
{Returns the priority for this visitor.Priority should be between -10 and 10 (0 is the default).
| |||||||
Data Fields | |
const | OPTIMIZE_ALL = -1 |
const | OPTIMIZE_NONE = 0 |
const | OPTIMIZE_FOR = 2 |
const | OPTIMIZE_RAW_FILTER = 4 |
const | OPTIMIZE_VAR_ACCESS = 8 |
Protected Member Functions | |
optimizeVariables ($node, $env) | |
optimizePrintNode ($node, $env) | |
Optimizes print nodes. More... | |
optimizeRawFilter ($node, $env) | |
Removes "raw" filters. More... | |
enterOptimizeFor ($node, $env) | |
Optimizes "for" tag by removing the "loop" variable creation whenever possible. More... | |
leaveOptimizeFor ($node, $env) | |
Optimizes "for" tag by removing the "loop" variable creation whenever possible. More... | |
addLoopToCurrent () | |
addLoopToAll () | |
Protected Attributes | |
$loops = array() | |
$optimizers | |
$prependedNodes = array() | |
$inABody = false | |
Twig_NodeVisitor_Optimizer tries to optimizes the AST.
This visitor is always the last registered one.
You can configure which optimizations you want to activate via the optimizer mode.
Definition at line 22 of file Optimizer.php.
__construct | ( | $optimizers = -1 | ) |
Constructor.
integer | $optimizers | The optimizer mode |
Definition at line 40 of file Optimizer.php.
|
protected |
Definition at line 232 of file Optimizer.php.
|
protected |
Definition at line 227 of file Optimizer.php.
enterNode | ( | Twig_NodeInterface | $node, |
Twig_Environment | $env | ||
) |
{Called before child nodes are visited.
Twig_NodeInterface | $node | The node to visit |
Twig_Environment | $env | The Twig environment instance |
Implements Twig_NodeVisitorInterface.
Definition at line 52 of file Optimizer.php.
|
protected |
Optimizes "for" tag by removing the "loop" variable creation whenever possible.
Twig_NodeInterface | $node | A Node |
Twig_Environment | $env | The current Twig environment |
Definition at line 171 of file Optimizer.php.
getPriority | ( | ) |
{Returns the priority for this visitor.Priority should be between -10 and 10 (0 is the default).
Implements Twig_NodeVisitorInterface.
Definition at line 242 of file Optimizer.php.
leaveNode | ( | Twig_NodeInterface | $node, |
Twig_Environment | $env | ||
) |
{Called after child nodes are visited.
Twig_NodeInterface | $node | The node to visit |
Twig_Environment | $env | The Twig environment instance |
Implements Twig_NodeVisitorInterface.
Definition at line 78 of file Optimizer.php.
|
protected |
Optimizes "for" tag by removing the "loop" variable creation whenever possible.
Twig_NodeInterface | $node | A Node |
Twig_Environment | $env | The current Twig environment |
Definition at line 220 of file Optimizer.php.
|
protected |
Optimizes print nodes.
It replaces:
Twig_NodeInterface | $node | A Node |
Twig_Environment | $env | The current Twig environment |
Definition at line 132 of file Optimizer.php.
|
protected |
Removes "raw" filters.
Twig_NodeInterface | $node | A Node |
Twig_Environment | $env | The current Twig environment |
Definition at line 156 of file Optimizer.php.
|
protected |
Definition at line 111 of file Optimizer.php.
|
protected |
Definition at line 33 of file Optimizer.php.
|
protected |
Definition at line 30 of file Optimizer.php.
|
protected |
Definition at line 31 of file Optimizer.php.
|
protected |
Definition at line 32 of file Optimizer.php.
const OPTIMIZE_ALL = -1 |
Definition at line 24 of file Optimizer.php.
const OPTIMIZE_FOR = 2 |
Definition at line 26 of file Optimizer.php.
const OPTIMIZE_NONE = 0 |
Definition at line 25 of file Optimizer.php.
const OPTIMIZE_RAW_FILTER = 4 |
Definition at line 27 of file Optimizer.php.
const OPTIMIZE_VAR_ACCESS = 8 |
Definition at line 28 of file Optimizer.php.
This documentation for Open ecommerce PEEL Shopping and PEEL.fr has been generated by Doxygen on Thu Oct 15 2015 14:41:45 - is a product of SAS. All rights reserved.