public function Twig_Environment::getTest in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/twig/twig/lib/Twig/Environment.php \Twig_Environment::getTest()
Gets a test by name.
Parameters
string $name The test name:
Return value
Twig_Test|false A Twig_Test instance or false if the test does not exist
File
- vendor/
twig/ twig/ lib/ Twig/ Environment.php, line 1053
Class
- Twig_Environment
- Stores the Twig configuration.
Code
public function getTest($name) {
if (!$this->extensionInitialized) {
$this
->initExtensions();
}
if (isset($this->tests[$name])) {
return $this->tests[$name];
}
return false;
}