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

Breadcrumb

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

function FactoryRuntimeLoader::load

Overrides RuntimeLoaderInterface::load

File

vendor/twig/twig/src/RuntimeLoader/FactoryRuntimeLoader.php, line 29

Class

FactoryRuntimeLoader
Lazy loads the runtime implementations for a Twig element.

Namespace

Twig\RuntimeLoader

Code

public function load(string $class) {
    if (!isset($this->map[$class])) {
        return null;
    }
    $runtimeFactory = $this->map[$class];
    return $runtimeFactory();
}
RSS feed
Powered by Drupal