You are here

protected function Twig_Environment::initExtensions in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/twig/twig/lib/Twig/Environment.php \Twig_Environment::initExtensions()
10 calls to Twig_Environment::initExtensions()
Twig_Environment::getBinaryOperators in vendor/twig/twig/lib/Twig/Environment.php
Gets the registered binary Operators.
Twig_Environment::getFilter in vendor/twig/twig/lib/Twig/Environment.php
Get a filter by name.
Twig_Environment::getFilters in vendor/twig/twig/lib/Twig/Environment.php
Gets the registered Filters.
Twig_Environment::getFunction in vendor/twig/twig/lib/Twig/Environment.php
Get a function by name.
Twig_Environment::getFunctions in vendor/twig/twig/lib/Twig/Environment.php
Gets registered functions.

... See full list

File

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

Class

Twig_Environment
Stores the Twig configuration.

Code

protected function initExtensions() {
  if ($this->extensionInitialized) {
    return;
  }
  $this->extensionInitialized = true;
  $this->parsers = new Twig_TokenParserBroker(array(), array(), false);
  $this->filters = array();
  $this->functions = array();
  $this->tests = array();
  $this->visitors = array();
  $this->unaryOperators = array();
  $this->binaryOperators = array();
  foreach ($this->extensions as $extension) {
    $this
      ->initExtension($extension);
  }
  $this
    ->initExtension($this->staging);
}