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. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
FileLocator.php
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 * @param KernelInterface $kernel A KernelInterface instance
29 * @param string|null $path The path the global resource directory
30 * @param array $paths An array of paths where to look for resources
31 */
32 public function __construct(KernelInterface $kernel, $path = null, array $paths = [])
33 {
34 $this->kernel = $kernel;
35 if (null !== $path) {
36 $this->path = $path;
37 $paths[] = $path;
38 }
39
40 parent::__construct($paths);
41 }
42
43 /**
44 * {@inheritdoc}
45 */
46 public function locate($file, $currentPath = null, $first = true)
47 {
48 if (isset($file[0]) && '@' === $file[0]) {
49 return $this->kernel->locateResource($file, $this->path, $first);
50 }
51
52 return parent::locate($file, $currentPath, $first);
53 }
54 }
55