
| Current Path : /var/www/html1/bbp/web/core/modules/system/tests/modules/twig_loader_test/src/Loader/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html1/bbp/web/core/modules/system/tests/modules/twig_loader_test/src/Loader/TestLoader.php |
<?php
namespace Drupal\twig_loader_test\Loader;
use Twig\Loader\LoaderInterface;
use Twig\Source;
/**
* A test Twig loader.
*/
class TestLoader implements LoaderInterface {
/**
* {@inheritdoc}
*/
public function getSourceContext($name) {
$name = (string) $name;
$value = $name === 'kittens' ? 'kittens' : 'cats';
return new Source($value, $name);
}
/**
* {@inheritdoc}
*/
public function exists($name) {
return TRUE;
}
/**
* {@inheritdoc}
*/
public function getCacheKey($name) {
return $name;
}
/**
* {@inheritdoc}
*/
public function isFresh($name, $time) {
return TRUE;
}
}