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

Breadcrumb

  1. Drupal Core 11.1.x
  2. TemplateLoader.php

trait TemplateLoader

@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit

@internal This trait is not covered by the backward compatibility promise for PHPUnit

Hierarchy

  • trait \PHPUnit\Framework\MockObject\Generator\TemplateLoader

File

vendor/phpunit/phpunit/src/Framework/MockObject/Generator/TemplateLoader.php, line 19

Namespace

PHPUnit\Framework\MockObject\Generator
View source
trait TemplateLoader {
    
    /**
     * @psalm-var array<string,Template>
     */
    private static array $templates = [];
    
    /**
     * @psalm-suppress MissingThrowsDocblock
     */
    private function loadTemplate(string $template) : Template {
        $filename = __DIR__ . '/templates/' . $template;
        if (!isset(self::$templates[$filename])) {
            self::$templates[$filename] = new Template($filename);
        }
        return self::$templates[$filename];
    }

}

Members

Title Sort descending Modifiers Object type Summary
TemplateLoader::$templates private static property @psalm-var array&lt;string,Template&gt;
TemplateLoader::loadTemplate private function @psalm-suppress MissingThrowsDocblock
RSS feed
Powered by Drupal