mirror of
https://github.com/twigphp/Twig.git
synced 2026-10-10 05:45:50 +00:00
c24c71a3ca
Do php-stan annotation have an impact on BC promise? The interface uses the term "class" already.. i'm guessing it's ok ?
32 lines
809 B
PHP
32 lines
809 B
PHP
<?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\RuntimeLoader;
|
|
|
|
/**
|
|
* Creates runtime implementations for Twig elements (filters/functions/tests).
|
|
*
|
|
* @author Fabien Potencier <fabien@symfony.com>
|
|
*/
|
|
interface RuntimeLoaderInterface
|
|
{
|
|
/**
|
|
* Creates the runtime implementation of a Twig element (filter/function/test).
|
|
*
|
|
* @template TRuntime of object
|
|
*
|
|
* @param class-string<TRuntime> $class A runtime class name
|
|
*
|
|
* @return TRuntime|null The runtime instance or null if the loader does not know how to create the runtime for this class
|
|
*/
|
|
public function load(string $class): ?object;
|
|
}
|