mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
[ticket/11998] Add phpBB abstraction for application and command.
PHPBB3-11998
This commit is contained in:
23
phpBB/phpbb/console/application.php
Normal file
23
phpBB/phpbb/console/application.php
Normal file
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
14
phpBB/phpbb/console/command/command.php
Normal file
14
phpBB/phpbb/console/command/command.php
Normal file
@@ -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
|
||||
{
|
||||
}
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user