You are here

protected function Twig_Extension_Core::getTestNodeClass in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/twig/twig/lib/Twig/Extension/Core.php \Twig_Extension_Core::getTestNodeClass()
1 call to Twig_Extension_Core::getTestNodeClass()
Twig_Extension_Core::parseTestExpression in vendor/twig/twig/lib/Twig/Extension/Core.php

File

vendor/twig/twig/lib/Twig/Extension/Core.php, line 324

Class

Twig_Extension_Core

Code

protected function getTestNodeClass(Twig_Parser $parser, $test) {
  if ($test instanceof Twig_SimpleTest) {
    return $test
      ->getNodeClass();
  }
  return $test instanceof Twig_Test_Node ? $test
    ->getClass() : 'Twig_Node_Expression_Test';
}