Security update to Drupal 8.4.6
[yaffs-website] / vendor / twig / twig / lib / Twig / LoaderInterface.php
1 <?php
2
3 /*
4  * This file is part of Twig.
5  *
6  * (c) 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  * @author Fabien Potencier <fabien@symfony.com>
16  */
17 interface Twig_LoaderInterface
18 {
19     /**
20      * Gets the source code of a template, given its name.
21      *
22      * @param string $name The name of the template to load
23      *
24      * @return string The template source code
25      *
26      * @throws Twig_Error_Loader When $name is not found
27      *
28      * @deprecated since 1.27 (to be removed in 2.0), implement Twig_SourceContextLoaderInterface
29      */
30     public function getSource($name);
31
32     /**
33      * Gets the cache key to use for the cache for a given template name.
34      *
35      * @param string $name The name of the template to load
36      *
37      * @return string The cache key
38      *
39      * @throws Twig_Error_Loader When $name is not found
40      */
41     public function getCacheKey($name);
42
43     /**
44      * Returns true if the template is still fresh.
45      *
46      * @param string $name The template name
47      * @param int    $time Timestamp of the last modification time of the
48      *                     cached template
49      *
50      * @return bool true if the template is fresh, false otherwise
51      *
52      * @throws Twig_Error_Loader When $name is not found
53      */
54     public function isFresh($name, $time);
55 }
56
57 class_alias('Twig_LoaderInterface', 'Twig\Loader\LoaderInterface', false);