diff options
author | Andreas Fischer <bantu@phpbb.com> | 2013-11-05 19:42:34 +0100 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2013-11-05 19:42:34 +0100 |
commit | 73ea5daf97bf5447b9bb2ff912cce4a9ea21c58e (patch) | |
tree | a357da0a0ab96a8533266b83e0d9253e8d02b060 /phpBB/phpbb | |
parent | 6bd2a89efc56993331c1e6da705f3065f3867094 (diff) | |
download | forums-73ea5daf97bf5447b9bb2ff912cce4a9ea21c58e.tar forums-73ea5daf97bf5447b9bb2ff912cce4a9ea21c58e.tar.gz forums-73ea5daf97bf5447b9bb2ff912cce4a9ea21c58e.tar.bz2 forums-73ea5daf97bf5447b9bb2ff912cce4a9ea21c58e.tar.xz forums-73ea5daf97bf5447b9bb2ff912cce4a9ea21c58e.zip |
[ticket/11998] Add phpBB abstraction for application and command.
PHPBB3-11998
Diffstat (limited to 'phpBB/phpbb')
-rw-r--r-- | phpBB/phpbb/console/application.php | 23 | ||||
-rw-r--r-- | phpBB/phpbb/console/command/command.php | 14 | ||||
-rw-r--r-- | phpBB/phpbb/console/command/fixup/recalculate_email_hash.php | 3 |
3 files changed, 38 insertions, 2 deletions
diff --git a/phpBB/phpbb/console/application.php b/phpBB/phpbb/console/application.php new file mode 100644 index 0000000000..fdcd9d42f6 --- /dev/null +++ b/phpBB/phpbb/console/application.php @@ -0,0 +1,23 @@ +<?php +/** +* +* @package phpBB3 +* @copyright (c) 2013 phpBB Group +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +namespace phpbb\console; + +use Symfony\Component\DependencyInjection\TaggedContainerInterface; + +class application extends \Symfony\Component\Console\Application +{ + function register_container_commands(TaggedContainerInterface $container, $tag = 'console.command') + { + foreach($container->findTaggedServiceIds($tag) as $id => $void) + { + $this->add($container->get($id)); + } + } +} diff --git a/phpBB/phpbb/console/command/command.php b/phpBB/phpbb/console/command/command.php new file mode 100644 index 0000000000..6abbdd203c --- /dev/null +++ b/phpBB/phpbb/console/command/command.php @@ -0,0 +1,14 @@ +<?php +/** +* +* @package phpBB3 +* @copyright (c) 2013 phpBB Group +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +* +*/ + +namespace phpbb\console\command; + +abstract class command extends \Symfony\Component\Console\Command\Command +{ +} diff --git a/phpBB/phpbb/console/command/fixup/recalculate_email_hash.php b/phpBB/phpbb/console/command/fixup/recalculate_email_hash.php index b788fe5631..04db880091 100644 --- a/phpBB/phpbb/console/command/fixup/recalculate_email_hash.php +++ b/phpBB/phpbb/console/command/fixup/recalculate_email_hash.php @@ -8,11 +8,10 @@ */ namespace phpbb\console\command\fixup; -use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -class recalculate_email_hash extends Command +class recalculate_email_hash extends \phpbb\console\command\command { /** @var \phpbb\db\driver\driver */ protected $db; |