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: class StringLoader extends Latte\Object implements Latte\ILoader
17: {
18:
19: /**
20: * Returns template source code.
21: * @return string
22: */
23: public function getContent($content)
24: {
25: return $content;
26: }
27:
28:
29: /**
30: * @return bool
31: */
32: public function isExpired($content, $time)
33: {
34: return FALSE;
35: }
36:
37:
38: /**
39: * Returns fully qualified template name.
40: * @return string
41: */
42: public function getChildName($content, $parent = NULL)
43: {
44: return $content;
45: }
46:
47: }
48: