| 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 |
namespace ElementorDeps\Twig\Loader; |
| 12 |
|
| 13 |
use ElementorDeps\Twig\Error\LoaderError; |
| 14 |
use ElementorDeps\Twig\Source; |
| 15 |
/** |
| 16 |
* Interface all loaders must implement. |
| 17 |
* |
| 18 |
* @author Fabien Potencier <fabien@symfony.com> |
| 19 |
*/ |
| 20 |
interface LoaderInterface |
| 21 |
{ |
| 22 |
/** |
| 23 |
* Returns the source context for a given template logical name. |
| 24 |
* |
| 25 |
* @throws LoaderError When $name is not found |
| 26 |
*/ |
| 27 |
public function getSourceContext(string $name) : Source; |
| 28 |
/** |
| 29 |
* Gets the cache key to use for the cache for a given template name. |
| 30 |
* |
| 31 |
* @throws LoaderError When $name is not found |
| 32 |
*/ |
| 33 |
public function getCacheKey(string $name) : string; |
| 34 |
/** |
| 35 |
* @param int $time Timestamp of the last modification time of the cached template |
| 36 |
* |
| 37 |
* @throws LoaderError When $name is not found |
| 38 |
*/ |
| 39 |
public function isFresh(string $name, int $time) : bool; |
| 40 |
/** |
| 41 |
* @return bool |
| 42 |
*/ |
| 43 |
public function exists(string $name); |
| 44 |
} |
| 45 |
|