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

ClosureLoader.php

Zuletzt modifiziert: 02.04.2025, 15:03 - Dateigröße: 1.05 KiB


01  <?php
02   
03  /*
04   * This file is part of the Symfony package.
05   *
06   * (c) Fabien Potencier <fabien@symfony.com>
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 Symfony\Component\DependencyInjection\Loader;
13   
14  use Symfony\Component\Config\Loader\Loader;
15  use Symfony\Component\DependencyInjection\ContainerBuilder;
16   
17  /**
18   * ClosureLoader loads service definitions from a PHP closure.
19   *
20   * The Closure has access to the container as its first argument.
21   *
22   * @author Fabien Potencier <fabien@symfony.com>
23   */
24  class ClosureLoader extends Loader
25  {
26      private $container;
27   
28      public function __construct(ContainerBuilder $container)
29      {
30          $this->container = $container;
31      }
32   
33      /**
34       * {@inheritdoc}
35       */
36      public function load($resource, $type = null)
37      {
38          \call_user_func($resource, $this->container);
39      }
40   
41      /**
42       * {@inheritdoc}
43       */
44      public function supports($resource, $type = null)
45      {
46          return $resource instanceof \Closure;
47      }
48  }
49