2021-05-20 16:53:34 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace App\Command;
|
|
|
|
|
2021-07-17 00:07:24 +08:00
|
|
|
use App\Model\Talk\TalkRecordsVote;
|
2021-05-20 16:53:34 +08:00
|
|
|
use Hyperf\Command\Command as HyperfCommand;
|
|
|
|
use Hyperf\Command\Annotation\Command;
|
2021-07-17 00:07:24 +08:00
|
|
|
use Hyperf\DbConnection\Db;
|
2021-05-20 16:53:34 +08:00
|
|
|
use Psr\Container\ContainerInterface;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @Command
|
|
|
|
*/
|
|
|
|
class TestCommand extends HyperfCommand
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @var ContainerInterface
|
|
|
|
*/
|
|
|
|
protected $container;
|
|
|
|
|
|
|
|
public function __construct(ContainerInterface $container)
|
|
|
|
{
|
|
|
|
$this->container = $container;
|
|
|
|
|
|
|
|
parent::__construct('test:command');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function configure()
|
|
|
|
{
|
|
|
|
parent::configure();
|
|
|
|
$this->setDescription('Hyperf Demo Command');
|
|
|
|
}
|
|
|
|
|
|
|
|
public function handle()
|
|
|
|
{
|
2021-07-17 00:07:24 +08:00
|
|
|
echo chr(65);
|
2021-05-20 16:53:34 +08:00
|
|
|
}
|
|
|
|
}
|