Verzeichnisstruktur phpBB-3.2.0


Veröffentlicht
06.01.2017

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

PhpFileLoader.php

Zuletzt modifiziert: 09.10.2024, 12:56 - Dateigröße: 1.22 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\Resource\FileResource;
 15   
 16  /**
 17   * PhpFileLoader loads service definitions from a PHP file.
 18   *
 19   * The PHP file is required and the $container variable can be
 20   * used within the file to change the container.
 21   *
 22   * @author Fabien Potencier <fabien@symfony.com>
 23   */
 24  class PhpFileLoader extends FileLoader
 25  {
 26      /**
 27       * {@inheritdoc}
 28       */
 29      public function load($resource, $type = null)
 30      {
 31          // the container and loader variables are exposed to the included file below
 32          $container = $this->container;
 33          $loader = $this;
 34   
 35          $path = $this->locator->locate($resource);
 36          $this->setCurrentDir(dirname($path));
 37          $this->container->addResource(new FileResource($path));
 38   
 39          include $path;
 40      }
 41   
 42      /**
 43       * {@inheritdoc}
 44       */
 45      public function supports($resource, $type = null)
 46      {
 47          return is_string($resource) && 'php' === pathinfo($resource, PATHINFO_EXTENSION);
 48      }
 49  }
 50