From 7030578bbe9e11c18b5becaf8b06e670e3c2e3cd Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Sun, 14 Jul 2013 01:32:34 -0400 Subject: [ticket/11698] Moving all autoloadable files to phpbb/ PHPBB3-11698 --- phpBB/phpbb/di/extension/core.php | 69 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 phpBB/phpbb/di/extension/core.php (limited to 'phpBB/phpbb/di/extension/core.php') diff --git a/phpBB/phpbb/di/extension/core.php b/phpBB/phpbb/di/extension/core.php new file mode 100644 index 0000000000..9c36ba2fc4 --- /dev/null +++ b/phpBB/phpbb/di/extension/core.php @@ -0,0 +1,69 @@ +root_path = $root_path; + } + + /** + * Loads a specific configuration. + * + * @param array $config An array of configuration values + * @param ContainerBuilder $container A ContainerBuilder instance + * + * @throws InvalidArgumentException When provided tag is not defined in this extension + */ + public function load(array $config, ContainerBuilder $container) + { + $loader = new YamlFileLoader($container, new FileLocator(phpbb_realpath($this->root_path . 'config'))); + $loader->load('services.yml'); + } + + /** + * Returns the recommended alias to use in XML. + * + * This alias is also the mandatory prefix to use when using YAML. + * + * @return string The alias + */ + public function getAlias() + { + return 'core'; + } +} -- cgit v1.2.1 From b95fdacdd378877d277e261465da73deb06e50da Mon Sep 17 00:00:00 2001 From: Nils Adermann Date: Tue, 10 Sep 2013 14:01:09 +0200 Subject: [ticket/11700] Move all recent code to namespaces PHPBB3-11700 --- phpBB/phpbb/di/extension/core.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'phpBB/phpbb/di/extension/core.php') diff --git a/phpBB/phpbb/di/extension/core.php b/phpBB/phpbb/di/extension/core.php index 9c36ba2fc4..901addc694 100644 --- a/phpBB/phpbb/di/extension/core.php +++ b/phpBB/phpbb/di/extension/core.php @@ -7,6 +7,8 @@ * */ +namespace phpbb\di\extension; + /** * @ignore */ @@ -23,7 +25,7 @@ use Symfony\Component\Config\FileLocator; /** * Container core extension */ -class phpbb_di_extension_core extends Extension +class core extends Extension { /** * phpBB Root path -- cgit v1.2.1 From 7aa8f6461f1e85cf91931f56b95384e54fec07c2 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Wed, 30 Oct 2013 13:05:28 +0100 Subject: [task/code-sniffer] Remove the IN_PHPBB check side-effect from class files. PHPBB3-11980 --- phpBB/phpbb/di/extension/core.php | 8 -------- 1 file changed, 8 deletions(-) (limited to 'phpBB/phpbb/di/extension/core.php') diff --git a/phpBB/phpbb/di/extension/core.php b/phpBB/phpbb/di/extension/core.php index 1f6b700973..455dfa7ecd 100644 --- a/phpBB/phpbb/di/extension/core.php +++ b/phpBB/phpbb/di/extension/core.php @@ -9,14 +9,6 @@ namespace phpbb\di\extension; -/** -* @ignore -*/ -if (!defined('IN_PHPBB')) -{ - exit; -} - use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\HttpKernel\DependencyInjection\Extension; use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; -- cgit v1.2.1 From a759704b39fc1c1353f865a633759b1369589b67 Mon Sep 17 00:00:00 2001 From: Yuriy Rusko Date: Tue, 27 May 2014 20:18:06 +0200 Subject: [ticket/12594] Remove @package tags and update file headers PHPBB3-12594 --- phpBB/phpbb/di/extension/core.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'phpBB/phpbb/di/extension/core.php') diff --git a/phpBB/phpbb/di/extension/core.php b/phpBB/phpbb/di/extension/core.php index 455dfa7ecd..72026f3b54 100644 --- a/phpBB/phpbb/di/extension/core.php +++ b/phpBB/phpbb/di/extension/core.php @@ -1,9 +1,13 @@ +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. * */ -- cgit v1.2.1 From 1033da36a39eb5177fea2dbb173b92ceb3a0ba50 Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Sun, 15 Jun 2014 13:25:16 +0200 Subject: [ticket/12715] Cleanup comments in \phpbb\di\* PHPBB3-12715 --- phpBB/phpbb/di/extension/core.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'phpBB/phpbb/di/extension/core.php') diff --git a/phpBB/phpbb/di/extension/core.php b/phpBB/phpbb/di/extension/core.php index 72026f3b54..ca4fa5c082 100644 --- a/phpBB/phpbb/di/extension/core.php +++ b/phpBB/phpbb/di/extension/core.php @@ -45,7 +45,7 @@ class core extends Extension * @param array $config An array of configuration values * @param ContainerBuilder $container A ContainerBuilder instance * - * @throws InvalidArgumentException When provided tag is not defined in this extension + * @throws \InvalidArgumentException When provided tag is not defined in this extension */ public function load(array $config, ContainerBuilder $container) { -- cgit v1.2.1