[ Index ]

PHP Cross Reference of phpBB-3.1.12-deutsch

title

Body

[close]

/phpbb/di/extension/ -> core.php (source)

   1  <?php
   2  /**
   3  *
   4  * This file is part of the phpBB Forum Software package.
   5  *
   6  * @copyright (c) phpBB Limited <https://www.phpbb.com>
   7  * @license GNU General Public License, version 2 (GPL-2.0)
   8  *
   9  * 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  }


Generated: Thu Jan 11 00:25:41 2018 Cross-referenced by PHPXref 0.7.1