35 lines
866 B
PHP
35 lines
866 B
PHP
<?php
|
|
|
|
namespace KupShop\OrderingBundle\Command;
|
|
|
|
use KupShop\OrderingBundle\EventListener\CronListener;
|
|
use Symfony\Component\Console\Command\Command;
|
|
use Symfony\Component\Console\Input\InputInterface;
|
|
use Symfony\Component\Console\Output\OutputInterface;
|
|
|
|
class NotifyNotPaidCommand extends Command
|
|
{
|
|
/** @var CronListener */
|
|
private $cronListener;
|
|
|
|
public function __construct(CronListener $cronListener)
|
|
{
|
|
parent::__construct();
|
|
$this->cronListener = $cronListener;
|
|
}
|
|
|
|
protected function configure()
|
|
{
|
|
$this
|
|
->setName('kupshop:ordering:notify-not-paid')
|
|
->setDescription('Notify customers about not paid orders');
|
|
}
|
|
|
|
protected function execute(InputInterface $input, OutputInterface $output)
|
|
{
|
|
$this->cronListener->handleNotifyNotPaid();
|
|
|
|
return 0;
|
|
}
|
|
}
|