|
0
|
1 |
<?php |
|
|
2 |
|
|
|
3 |
/* |
|
|
4 |
* This file is part of Twig. |
|
|
5 |
* |
|
|
6 |
* (c) 2009 Fabien Potencier |
|
|
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 |
/** |
|
|
13 |
* Interface all loaders must implement. |
|
|
14 |
* |
|
|
15 |
* @package twig |
|
|
16 |
* @author Fabien Potencier <fabien@symfony.com> |
|
|
17 |
*/ |
|
|
18 |
interface Twig_LoaderInterface |
|
|
19 |
{ |
|
|
20 |
/** |
|
|
21 |
* Gets the source code of a template, given its name. |
|
|
22 |
* |
|
|
23 |
* @param string $name The name of the template to load |
|
|
24 |
* |
|
|
25 |
* @return string The template source code |
|
|
26 |
*/ |
|
|
27 |
function getSource($name); |
|
|
28 |
|
|
|
29 |
/** |
|
|
30 |
* Gets the cache key to use for the cache for a given template name. |
|
|
31 |
* |
|
|
32 |
* @param string $name The name of the template to load |
|
|
33 |
* |
|
|
34 |
* @return string The cache key |
|
|
35 |
*/ |
|
|
36 |
function getCacheKey($name); |
|
|
37 |
|
|
|
38 |
/** |
|
|
39 |
* Returns true if the template is still fresh. |
|
|
40 |
* |
|
|
41 |
* @param string $name The template name |
|
|
42 |
* @param timestamp $time The last modification time of the cached template |
|
|
43 |
*/ |
|
|
44 |
function isFresh($name, $time); |
|
|
45 |
} |