| 1 |
1686
|
darkviper
|
<?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 |
|
|
* @throws Twig_Error_Loader When $name is not found
|
| 28 |
|
|
*/
|
| 29 |
|
|
function getSource($name);
|
| 30 |
|
|
|
| 31 |
|
|
/**
|
| 32 |
|
|
* Gets the cache key to use for the cache for a given template name.
|
| 33 |
|
|
*
|
| 34 |
|
|
* @param string $name The name of the template to load
|
| 35 |
|
|
*
|
| 36 |
|
|
* @return string The cache key
|
| 37 |
|
|
*
|
| 38 |
|
|
* @throws Twig_Error_Loader When $name is not found
|
| 39 |
|
|
*/
|
| 40 |
|
|
function getCacheKey($name);
|
| 41 |
|
|
|
| 42 |
|
|
/**
|
| 43 |
|
|
* Returns true if the template is still fresh.
|
| 44 |
|
|
*
|
| 45 |
|
|
* @param string $name The template name
|
| 46 |
|
|
* @param timestamp $time The last modification time of the cached template
|
| 47 |
|
|
*
|
| 48 |
|
|
* @return Boolean true if the template is fresh, false otherwise
|
| 49 |
|
|
*
|
| 50 |
|
|
* @throws Twig_Error_Loader When $name is not found
|
| 51 |
|
|
*/
|
| 52 |
|
|
function isFresh($name, $time);
|
| 53 |
|
|
}
|