Files
Twig/src/RuntimeLoader/RuntimeLoaderInterface.php
T
Simon André c24c71a3ca Add @template on RuntimeLoaderinterface (Twig 4)
Do php-stan annotation have an impact on BC promise? 

The interface uses the term "class" already.. i'm guessing it's ok ?
2025-01-02 05:07:35 +01:00

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;
}