32 lines
760 B
PHP
32 lines
760 B
PHP
<?php
|
||
/**
|
||
*
|
||
* @author:llbjj
|
||
* @DateTime:2022/5/9 14:31
|
||
* @Description:
|
||
*
|
||
*/
|
||
|
||
namespace Application\Command;
|
||
|
||
use Interop\Container\Containerinterface;
|
||
use Application\Common\Container;
|
||
use Application\Service\Extension\Laminas;
|
||
|
||
class BasicCommand extends \Symfony\Component\Console\Command\Command
|
||
{
|
||
protected $container;
|
||
public function __construct(Containerinterface $container)
|
||
{
|
||
parent::__construct(null);
|
||
$this->container = $container;
|
||
if(empty(Laminas::$serviceManager)) {
|
||
Laminas::initialize($this->container->get('Application'));
|
||
}
|
||
date_default_timezone_set('Asia/Chongqing');
|
||
}
|
||
|
||
public function LocalService(){
|
||
return new Container($this->container);
|
||
}
|
||
} |