protected function Twig_Test_NodeTestCase::getVariableGetter in Translation template extractor 6.3
Same name and namespace in other branches
- 7.3 vendor/Twig/Test/NodeTestCase.php \Twig_Test_NodeTestCase::getVariableGetter()
File
- vendor/
Twig/ Test/ NodeTestCase.php, line 41
Class
Code
protected function getVariableGetter($name) {
if (version_compare(phpversion(), '5.4.0RC1', '>=')) {
return sprintf('(isset($context["%s"]) ? $context["%s"] : null)', $name, $name);
}
return sprintf('$this->getContext($context, "%s")', $name);
}