1: <?php
2: /**
3: * PHP version 5
4: * @package generalDriver
5: * @author Christian Schiffler <c.schiffler@cyberspectrum.de>
6: * @author Stefan Heimes <stefan_heimes@hotmail.com>
7: * @author Tristan Lins <tristan.lins@bit3.de>
8: * @copyright The MetaModels team.
9: * @license LGPL.
10: * @filesource
11: */
12:
13: namespace DcGeneral\Contao\Compatibility;
14:
15: use DcGeneral\Exception\DcGeneralException;
16:
17: /**
18: * Class TemplateLoader
19: *
20: * This class simply exists to provide the Contao 3 namespace based auto loading in Contao 2.11.
21: * It is heavily based upon code by Leo Feyer and only temporary.
22: *
23: * It does not perform any actions but merely exist to provide the class needed by autoload.php files.
24: */
25: class TemplateLoader
26: {
27: /**
28: * No op.
29: *
30: * @param string $name The template name.
31: *
32: * @param string $file The path to the template folder.
33: *
34: * @return void
35: */
36: public static function addFile($name, $file)
37: {
38: // No op.
39: }
40:
41:
42: /**
43: * No op.
44: *
45: * @param array $files An array of files.
46: *
47: * @return void
48: */
49: public static function addFiles($files)
50: {
51: // No op.
52: }
53:
54: /**
55: * No op.
56: *
57: * @throws DcGeneralException Always.
58: *
59: * @return void
60: */
61: public static function getFiles()
62: {
63: throw new DcGeneralException('TemplateLoader is a non op compatibility class by DcGeneral.');
64: }
65:
66: /**
67: * No op.
68: *
69: * @param string $prefix The prefix (e.g. "moo_").
70: *
71: * @throws DcGeneralException Always.
72: *
73: * @return void
74: */
75: public static function getPrefixedFiles($prefix)
76: {
77: throw new DcGeneralException('TemplateLoader is a non op compatibility class by DcGeneral.');
78: }
79:
80: /**
81: * No op.
82: *
83: * @param string $template The template name.
84: *
85: * @param string $format The output format (e.g. "html5").
86: *
87: * @param string $custom The custom templates folder (defaults to "templates").
88: *
89: * @throws DcGeneralException If $template does not exist.
90: *
91: * @return void
92: */
93: public static function getPath($template, $format, $custom = 'templates')
94: {
95: throw new DcGeneralException('TemplateLoader is a non op compatibility class by DcGeneral.');
96: }
97: }
98: