]> git.immae.eu Git - github/wallabag/wallabag.git/blob - vendor/symfony/twig-bridge/Symfony/Bridge/Twig/Tests/Extension/Fixtures/StubFilesystemLoader.php
twig implementation
[github/wallabag/wallabag.git] / vendor / symfony / twig-bridge / Symfony / Bridge / Twig / Tests / Extension / Fixtures / StubFilesystemLoader.php
1 <?php
2
3 /*
4 * This file is part of the Symfony package.
5 *
6 * (c) Fabien Potencier <fabien@symfony.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12 namespace Symfony\Bridge\Twig\Tests\Extension\Fixtures;
13
14 // Preventing autoloader throwing E_FATAL when Twig is now available
15 if (!class_exists('Twig_Environment')) {
16 class StubFilesystemLoader
17 {
18 }
19 } else {
20 class StubFilesystemLoader extends \Twig_Loader_Filesystem
21 {
22 protected function findTemplate($name)
23 {
24 // strip away bundle name
25 $parts = explode(':', $name);
26
27 return parent::findTemplate(end($parts));
28 }
29 }
30 }