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 |
IniFileLoader.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\DependencyInjection\Loader;
13
14 use Symfony\Component\Config\Resource\FileResource;
15 use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
16
17 /**
18 * IniFileLoader loads parameters from INI files.
19 *
20 * @author Fabien Potencier <fabien@symfony.com>
21 */
22 class IniFileLoader extends FileLoader
23 {
24 /**
25 * {@inheritdoc}
26 */
27 public function load($resource, $type = null)
28 {
29 $path = $this->locator->locate($resource);
30
31 $this->container->addResource(new FileResource($path));
32
33 $result = parse_ini_file($path, true);
34 if (false === $result || array() === $result) {
35 throw new InvalidArgumentException(sprintf('The "%s" file is not valid.', $resource));
36 }
37
38 if (isset($result['parameters']) && is_array($result['parameters'])) {
39 foreach ($result['parameters'] as $key => $value) {
40 $this->container->setParameter($key, $value);
41 }
42 }
43 }
44
45 /**
46 * {@inheritdoc}
47 */
48 public function supports($resource, $type = null)
49 {
50 return is_string($resource) && 'ini' === pathinfo($resource, PATHINFO_EXTENSION);
51 }
52 }
53