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

Breadcrumb

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

function ContainerRuntimeLoader::load

Overrides RuntimeLoaderInterface::load

File

vendor/twig/twig/src/RuntimeLoader/ContainerRuntimeLoader.php, line 31

Class

ContainerRuntimeLoader
Lazily loads Twig runtime implementations from a PSR-11 container.

Namespace

Twig\RuntimeLoader

Code

public function load(string $class) {
    return $this->container
        ->has($class) ? $this->container
        ->get($class) : null;
}
RSS feed
Powered by Drupal