\Twig_Compiler
Compiles a node to PHP code.
- Author: Fabien Potencier <fabien@symfony.com>
Synopsis
class Twig_Compiler
implements
Twig_CompilerInterface
{
- // members
- protected $lastLine;
- protected $source;
- protected $indentation;
- protected $env;
- protected $debugInfo;
- protected $sourceOffset;
- protected $sourceLine;
- protected $filename;
- // methods
- public void __construct()
- public void getFilename()
- public Twig_Environment getEnvironment()
- public string getSource()
- public Twig_Compiler compile()
- public void subcompile()
- public Twig_Compiler raw()
- public Twig_Compiler write()
- public Twig_Compiler addIndentation()
- public Twig_Compiler string()
- public Twig_Compiler repr()
- public Twig_Compiler addDebugInfo()
- public void getDebugInfo()
- public Twig_Compiler indent()
- public Twig_Compiler outdent()
Hierarchy
Implements
Members
protected
- $debugInfo
- $env
- $filename
- $indentation
- $lastLine
- $source
- $sourceLine
- $sourceOffset
Methods
public
- __construct() — Constructor.
- addDebugInfo() — Adds debugging information.
- addIndentation() — Appends an indentation to the current PHP code after compilation.
- compile() — Compiles a node.
- getDebugInfo()
- getEnvironment() — Returns the environment instance related to this compiler.
- getFilename()
- getSource() — Gets the current PHP code after compilation.
- indent() — Indents the generated code.
- outdent() — Outdents the generated code.
- raw() — Adds a raw string to the compiled code.
- repr() — Returns a PHP representation of a given value.
- string() — Adds a quoted string to the compiled code.
- subcompile()
- write() — Writes a string to the compiled code by adding indentation.