Verzeichnisstruktur phpBB-3.3.15


Veröffentlicht
28.08.2024

So funktioniert es


Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück

Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

(Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

FactoryRuntimeLoader.php

Zuletzt modifiziert: 02.04.2025, 15:03 - Dateigröße: 905.00 Bytes


01  <?php
02   
03  /*
04   * This file is part of Twig.
05   *
06   * (c) Fabien Potencier
07   *
08   * For the full copyright and license information, please view the LICENSE
09   * file that was distributed with this source code.
10   */
11   
12  namespace Twig\RuntimeLoader;
13   
14  /**
15   * Lazy loads the runtime implementations for a Twig element.
16   *
17   * @author Robin Chalas <robin.chalas@gmail.com>
18   */
19  class FactoryRuntimeLoader implements RuntimeLoaderInterface
20  {
21      private $map;
22   
23      /**
24       * @param array $map An array where keys are class names and values factory callables
25       */
26      public function __construct(array $map = [])
27      {
28          $this->map = $map;
29      }
30   
31      public function load($class)
32      {
33          if (isset($this->map[$class])) {
34              $runtimeFactory = $this->map[$class];
35   
36              return $runtimeFactory();
37          }
38      }
39  }
40   
41  class_alias('Twig\RuntimeLoader\FactoryRuntimeLoader', 'Twig_FactoryRuntimeLoader');
42