44 lines
1.2 KiB
PHP
44 lines
1.2 KiB
PHP
<?php
|
|
|
|
namespace App\Command;
|
|
|
|
use Symfony\Component\Console\Command\Command;
|
|
use Symfony\Component\Console\Input\InputArgument;
|
|
use Symfony\Component\Console\Input\InputInterface;
|
|
use Symfony\Component\Console\Input\InputOption;
|
|
use Symfony\Component\Console\Output\OutputInterface;
|
|
use Symfony\Component\Console\Style\SymfonyStyle;
|
|
use App\Repository\UserRepositoryQuery;
|
|
use App\Criteria\CriteriaMap;
|
|
|
|
class TestCommand extends Command
|
|
{
|
|
protected static $defaultName = 'app:test';
|
|
protected static $defaultDescription = 'Test';
|
|
|
|
protected $userRepositoryQuery;
|
|
|
|
public function __construct(UserRepositoryQuery $userRepositoryQuery)
|
|
{
|
|
parent::__construct();
|
|
|
|
$this->userRepositoryQuery = $userRepositoryQuery;
|
|
}
|
|
|
|
protected function configure()
|
|
{
|
|
$this
|
|
->setDescription(self::$defaultDescription)
|
|
->addArgument('arg1', InputArgument::OPTIONAL, 'Argument description')
|
|
->addOption('option1', null, InputOption::VALUE_NONE, 'Option description')
|
|
;
|
|
}
|
|
|
|
protected function execute(InputInterface $input, OutputInterface $output): int
|
|
{
|
|
$query = $this->userRepositoryQuery->create();
|
|
|
|
return Command::SUCCESS;
|
|
}
|
|
}
|