Final Class Yiisoft\Queue\Command\ListenCommand
| Inheritance | Yiisoft\Queue\Command\ListenCommand » Symfony\Component\Console\Command\Command |
|---|
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\Queue\Command\ListenCommand | |
| configure() | Yiisoft\Queue\Command\ListenCommand |
Protected Methods
| Method | Description | Defined By |
|---|---|---|
| execute() | Yiisoft\Queue\Command\ListenCommand |
Method Details
| public mixed __construct ( Yiisoft\Queue\Provider\QueueProviderInterface $queueProvider ) | ||
| $queueProvider | Yiisoft\Queue\Provider\QueueProviderInterface | |
public function __construct(
private readonly QueueProviderInterface $queueProvider
) {
parent::__construct();
}
| public void configure ( ) |
public function configure(): void
{
$this->addArgument(
'channel',
InputArgument::OPTIONAL,
'Queue channel name to connect to',
QueueInterface::DEFAULT_CHANNEL,
);
}
| protected integer execute ( \Symfony\Component\Console\Input\InputInterface $input, \Symfony\Component\Console\Output\OutputInterface $output ) | ||
| $input | \Symfony\Component\Console\Input\InputInterface | |
| $output | \Symfony\Component\Console\Output\OutputInterface | |
protected function execute(InputInterface $input, OutputInterface $output): int
{
$this->queueProvider
->get($input->getArgument('channel'))
->listen();
return 0;
}
Signup or Login in order to comment.