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. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
core.php
01 <?php
02 /**
03 *
04 * This file is part of the phpBB Forum Software package.
05 *
06 * @copyright (c) phpBB Limited <https://www.phpbb.com>
07 * @license GNU General Public License, version 2 (GPL-2.0)
08 *
09 * For full copyright and license information, please see
10 * the docs/CREDITS.txt file.
11 *
12 */
13
14 namespace phpbb\di\extension;
15
16 use Symfony\Component\DependencyInjection\ContainerBuilder;
17 use Symfony\Component\HttpKernel\DependencyInjection\Extension;
18 use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
19 use Symfony\Component\Config\FileLocator;
20
21 /**
22 * Container core extension
23 */
24 class core extends Extension
25 {
26 /**
27 * Config path
28 * @var string
29 */
30 protected $config_path;
31
32 /**
33 * Constructor
34 *
35 * @param string $config_path Config path
36 */
37 public function __construct($config_path)
38 {
39 $this->config_path = $config_path;
40 }
41
42 /**
43 * Loads a specific configuration.
44 *
45 * @param array $config An array of configuration values
46 * @param ContainerBuilder $container A ContainerBuilder instance
47 *
48 * @throws \InvalidArgumentException When provided tag is not defined in this extension
49 */
50 public function load(array $config, ContainerBuilder $container)
51 {
52 $loader = new YamlFileLoader($container, new FileLocator(phpbb_realpath($this->config_path)));
53 $loader->load('services.yml');
54 }
55
56 /**
57 * Returns the recommended alias to use in XML.
58 *
59 * This alias is also the mandatory prefix to use when using YAML.
60 *
61 * @return string The alias
62 */
63 public function getAlias()
64 {
65 return 'core';
66 }
67 }
68