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 |
tables.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
19 /**
20 * Container tables extension
21 */
22 class tables extends Extension
23 {
24 /**
25 * {@inheritDoc}
26 */
27 public function load(array $configs, ContainerBuilder $container)
28 {
29 // Tables is a reserved parameter and will be overwritten at all times
30 $tables = [];
31
32 // Add access via 'tables' parameter to acquire array with all tables
33 $parameterBag = $container->getParameterBag();
34 $parameters = $parameterBag->all();
35 foreach ($parameters as $parameter_name => $parameter_value)
36 {
37 if (!preg_match('/tables\.(.+)/', $parameter_name, $matches))
38 {
39 continue;
40 }
41
42 $tables[$matches[1]] = $parameter_value;
43 }
44
45 $container->setParameter('tables', $tables);
46 }
47
48 /**
49 * Returns the recommended alias to use in XML.
50 *
51 * This alias is also the mandatory prefix to use when using YAML.
52 *
53 * @return string The alias
54 */
55 public function getAlias()
56 {
57 return 'tables';
58 }
59 }
60