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. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
DelegatingLoader.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\Config\Loader;
13
14 use Symfony\Component\Config\Exception\FileLoaderLoadException;
15
16 /**
17 * DelegatingLoader delegates loading to other loaders using a loader resolver.
18 *
19 * This loader acts as an array of LoaderInterface objects - each having
20 * a chance to load a given resource (handled by the resolver)
21 *
22 * @author Fabien Potencier <fabien@symfony.com>
23 */
24 class DelegatingLoader extends Loader
25 {
26 /**
27 * Constructor.
28 *
29 * @param LoaderResolverInterface $resolver A LoaderResolverInterface instance
30 */
31 public function __construct(LoaderResolverInterface $resolver)
32 {
33 $this->resolver = $resolver;
34 }
35
36 /**
37 * {@inheritdoc}
38 */
39 public function load($resource, $type = null)
40 {
41 if (false === $loader = $this->resolver->resolve($resource, $type)) {
42 throw new FileLoaderLoadException($resource);
43 }
44
45 return $loader->load($resource, $type);
46 }
47
48 /**
49 * {@inheritdoc}
50 */
51 public function supports($resource, $type = null)
52 {
53 return false !== $this->resolver->resolve($resource, $type);
54 }
55 }
56