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.
Auf den Verzeichnisnamen klicken, dies zeigt nur das Verzeichnis mit Inhalt an

      (Beispiel Datei-Icons)

Auf das Icon klicken um den Quellcode anzuzeigen

ext.php

Zuletzt modifiziert: 09.10.2024, 12:54 - Dateigröße: 1.53 KiB


 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 ext extension
 23  */
 24  class ext extends Extension
 25  {
 26      protected $paths = array();
 27   
 28      public function __construct($enabled_extensions)
 29      {
 30          foreach ($enabled_extensions as $ext => $path)
 31          {
 32              $this->paths[] = $path;
 33          }
 34      }
 35   
 36      /**
 37      * Loads a specific configuration.
 38      *
 39      * @param array            $config    An array of configuration values
 40      * @param ContainerBuilder $container A ContainerBuilder instance
 41      *
 42      * @throws \InvalidArgumentException When provided tag is not defined in this extension
 43      */
 44      public function load(array $config, ContainerBuilder $container)
 45      {
 46          foreach ($this->paths as $path)
 47          {
 48              if (file_exists($path . '/config/services.yml'))
 49              {
 50                  $loader = new YamlFileLoader($container, new FileLocator(phpbb_realpath($path . '/config')));
 51                  $loader->load('services.yml');
 52              }
 53          }
 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 'ext';
 66      }
 67  }
 68