equal
deleted
inserted
replaced
|
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 |
|
12 namespace Symfony\Component\Templating\Loader; |
|
13 |
|
14 use Symfony\Component\Templating\TemplateReferenceInterface; |
|
15 |
|
16 /** |
|
17 * LoaderInterface is the interface all loaders must implement. |
|
18 * |
|
19 * @author Fabien Potencier <fabien@symfony.com> |
|
20 * |
|
21 * @api |
|
22 */ |
|
23 interface LoaderInterface |
|
24 { |
|
25 /** |
|
26 * Loads a template. |
|
27 * |
|
28 * @param TemplateReferenceInterface $template A template |
|
29 * |
|
30 * @return Storage|Boolean false if the template cannot be loaded, a Storage instance otherwise |
|
31 * |
|
32 * @api |
|
33 */ |
|
34 function load(TemplateReferenceInterface $template); |
|
35 |
|
36 /** |
|
37 * Returns true if the template is still fresh. |
|
38 * |
|
39 * @param TemplateReferenceInterface $template A template |
|
40 * @param integer $time The last modification time of the cached template (timestamp) |
|
41 * |
|
42 * @api |
|
43 */ |
|
44 function isFresh(TemplateReferenceInterface $template, $time); |
|
45 } |