1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-02 12:34:59 +02:00

[ticket/11998] Use container to get all commands using 'console.command' tag.

PHPBB3-11998
This commit is contained in:
Andreas Fischer 2013-11-03 03:24:06 +01:00
parent aec5b9d156
commit 5db1ec163d
2 changed files with 7 additions and 2 deletions

View File

@ -6,6 +6,7 @@ imports:
- { resource: avatars.yml }
- { resource: feed.yml }
- { resource: auth_providers.yml }
- { resource: console.yml }
services:
acl.permissions:

View File

@ -28,7 +28,11 @@ require($phpbb_root_path . 'phpbb/class_loader.' . $phpEx);
$phpbb_class_loader = new \phpbb\class_loader('phpbb\\', "{$phpbb_root_path}phpbb/", $phpEx);
$phpbb_class_loader->register();
$phpbb_container = phpbb_create_update_container($phpbb_root_path, $phpEx, "$phpbb_root_path/config");
$application = new Application('phpBB Console', PHPBB_VERSION);
$application->addCommands(array(
));
foreach($phpbb_container->findTaggedServiceIds('console.command') as $id => $void)
{
$application->add($phpbb_container->get($id));
}
$application->run();