BaseCommand.php 481 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace app\http\command;
  3. use think\console\Command;
  4. class BaseCommand extends Command
  5. {
  6. /**
  7. * @var null 读取系统配置
  8. */
  9. protected $config = null;
  10. /**
  11. * BaseCommand constructor.
  12. * @param null $name
  13. */
  14. public function __construct($name = null)
  15. {
  16. parent::__construct($name);
  17. // 缓存配置
  18. $this->config = model('common/SystemConfig')->getAppConfig('',true);
  19. }
  20. }