aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/symfony/twig-bridge/Symfony/Bridge/Twig/Tests/Extension/Fixtures/StubFilesystemLoader.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/symfony/twig-bridge/Symfony/Bridge/Twig/Tests/Extension/Fixtures/StubFilesystemLoader.php')
-rw-r--r--vendor/symfony/twig-bridge/Symfony/Bridge/Twig/Tests/Extension/Fixtures/StubFilesystemLoader.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/vendor/symfony/twig-bridge/Symfony/Bridge/Twig/Tests/Extension/Fixtures/StubFilesystemLoader.php b/vendor/symfony/twig-bridge/Symfony/Bridge/Twig/Tests/Extension/Fixtures/StubFilesystemLoader.php
new file mode 100644
index 00000000..36c61cd6
--- /dev/null
+++ b/vendor/symfony/twig-bridge/Symfony/Bridge/Twig/Tests/Extension/Fixtures/StubFilesystemLoader.php
@@ -0,0 +1,30 @@
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
12namespace Symfony\Bridge\Twig\Tests\Extension\Fixtures;
13
14// Preventing autoloader throwing E_FATAL when Twig is now available
15if (!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}