1: <?php
2:
3: /**
4: * This file is part of the Latte (https://latte.nette.org)
5: * Copyright (c) 2008 David Grudl (https://davidgrudl.com)
6: */
7:
8: namespace Latte\Loaders;
9:
10: use Latte;
11:
12:
13: /**
14: * Template loader.
15: *
16: * @author David Grudl
17: */
18: class StringLoader extends Latte\Object implements Latte\ILoader
19: {
20:
21: /**
22: * Returns template source code.
23: * @return string
24: */
25: public function getContent($content)
26: {
27: return $content;
28: }
29:
30:
31: /**
32: * @return bool
33: */
34: public function isExpired($content, $time)
35: {
36: return FALSE;
37: }
38:
39:
40: /**
41: * Returns fully qualified template name.
42: * @return string
43: */
44: public function getChildName($content, $parent = NULL)
45: {
46: return $content;
47: }
48:
49: }
50: