Verzeichnisstruktur phpBB-3.1.0


Veröffentlicht
27.10.2014

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

FileLocator.php

Zuletzt modifiziert: 09.10.2024, 12:58 - Dateigröße: 1.43 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\HttpKernel\Config;
 13   
 14  use Symfony\Component\Config\FileLocator as BaseFileLocator;
 15  use Symfony\Component\HttpKernel\KernelInterface;
 16   
 17  /**
 18   * FileLocator uses the KernelInterface to locate resources in bundles.
 19   *
 20   * @author Fabien Potencier <fabien@symfony.com>
 21   */
 22  class FileLocator extends BaseFileLocator
 23  {
 24      private $kernel;
 25      private $path;
 26   
 27      /**
 28       * Constructor.
 29       *
 30       * @param KernelInterface $kernel A KernelInterface instance
 31       * @param null|string     $path   The path the global resource directory
 32       * @param array           $paths  An array of paths where to look for resources
 33       */
 34      public function __construct(KernelInterface $kernel, $path = null, array $paths = array())
 35      {
 36          $this->kernel = $kernel;
 37          if (null !== $path) {
 38              $this->path = $path;
 39              $paths[] = $path;
 40          }
 41   
 42          parent::__construct($paths);
 43      }
 44   
 45      /**
 46       * {@inheritdoc}
 47       */
 48      public function locate($file, $currentPath = null, $first = true)
 49      {
 50          if ('@' === $file[0]) {
 51              return $this->kernel->locateResource($file, $this->path, $first);
 52          }
 53   
 54          return parent::locate($file, $currentPath, $first);
 55      }
 56  }
 57