Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x

LoaderInterface.php

Same filename in this branch
  1. 11.1.x vendor/composer/composer/src/Composer/Package/Loader/LoaderInterface.php
  2. 11.1.x vendor/symfony/serializer/Mapping/Loader/LoaderInterface.php
  3. 11.1.x vendor/symfony/validator/Mapping/Loader/LoaderInterface.php

Namespace

Twig\Loader

File

vendor/twig/twig/src/Loader/LoaderInterface.php

View source
<?php


/*
 * This file is part of Twig.
 *
 * (c) Fabien Potencier
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */
namespace Twig\Loader;

use Twig\Error\LoaderError;
use Twig\Source;

/**
 * Interface all loaders must implement.
 *
 * @author Fabien Potencier <fabien@symfony.com>
 */
interface LoaderInterface {
    
    /**
     * Returns the source context for a given template logical name.
     *
     * @throws LoaderError When $name is not found
     */
    public function getSourceContext(string $name) : Source;
    
    /**
     * Gets the cache key to use for the cache for a given template name.
     *
     * @throws LoaderError When $name is not found
     */
    public function getCacheKey(string $name) : string;
    
    /**
     * @param int $time Timestamp of the last modification time of the cached template
     *
     * @throws LoaderError When $name is not found
     */
    public function isFresh(string $name, int $time) : bool;
    
    /**
     * @return bool
     */
    public function exists(string $name);

}

Interfaces

Title Deprecated Summary
LoaderInterface Interface all loaders must implement.
RSS feed
Powered by Drupal