You are here

public function Twig_Environment::compile in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/twig/twig/lib/Twig/Environment.php \Twig_Environment::compile()

Compiles a node and returns the PHP code.

Parameters

Twig_NodeInterface $node A Twig_NodeInterface instance:

Return value

string The compiled PHP source code

1 call to Twig_Environment::compile()
Twig_Environment::compileSource in vendor/twig/twig/lib/Twig/Environment.php
Compiles a template source code.

File

vendor/twig/twig/lib/Twig/Environment.php, line 649

Class

Twig_Environment
Stores the Twig configuration.

Code

public function compile(Twig_NodeInterface $node) {
  return $this
    ->getCompiler()
    ->compile($node)
    ->getSource();
}