$_context
$_context :
__construct(\cn\gz53\framework\core\Context $context)
\cn\gz53\framework\core\Context | $context |
getInstance(\cn\gz53\framework\core\Context $context)
\cn\gz53\framework\core\Context | $context |
resError(\cn\gz53\framework\core\IError $error)
\cn\gz53\framework\core\IError | $error |
<?php
/**
* // +----------------------------------------------------------------------
* // | phpMore [ WE CAN DO IT MORE ]
* // +----------------------------------------------------------------------
* // | Copyright (c) 20011~2019 广州务商网络科技有限公司 All rights reserved.
* // +----------------------------------------------------------------------
* // | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
* // +----------------------------------------------------------------------
* // | Author: sujunli <4297088@qq.com>
* // +----------------------------------------------------------------------
*/
namespace cn\gz53\framework\service\cli;
use cn\gz53\framework\dao\cli\CliCommandDao;
use cn\gz53\framework\dao\runner\RunnerDao;
use cn\gz53\framework\model\bo\cli\CliCommandRunnerSetBo;
use cn\gz53\framework\service\Service;
class CliCommandService extends Service
{
public function setRunner(){
$bo = CliCommandRunnerSetBo::getInstance($this->_context);
$runnerDao = RunnerDao::getInstance($this->_context);
$cliCommandDao = CliCommandDao::getInstance($this->_context);
if(!$runnerDao->getRunCallback($bo)){
return false;
}
if(!$cliCommandDao->setRunCallback($bo)){
return false;
}
return true;
}
}