thinkphp/library/think/Console.php

(开头部分) 2KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

<?php
// +----------------------------------------------------------------------
// | TopThink [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2015 http://www.topthink.com All rights reserved.
// +----------------------------------------------------------------------
// | Author: zhangyajun <448901948@qq.com>
// +----------------------------------------------------------------------

namespace think;

use think\console\Command;
use think\console\command\Help as HelpCommand;
use think\console\Input;
use think\console\input\Argument as InputArgument;
use think\console\input\Definition as InputDefinition;
use think\console\input\Option as InputOption;
use think\console\Output;
use think\console\output\driver\Buffer;

class Console
{

    private $name;
    private $version;

    /** @var Command[] */
    private $commands = [];

    private $wantHelps = false;

    private $catchExceptions = true;
    private $autoExit        = true;
    private $definition;
    private $defaultCommand;

    private static $defaultCommands = [
        'help'              => "think\\console\\command\\Help",
        'list'              => "think\\console\\command\\Lists",
        'build'             => "think\\console\\command\\Build",
        'clear'             => "think\\console\\command\\Clear",
        'make:command'      => "think\\console\\command\\make\\Command",
        'make:controller'   => "think\\console\\command\\make\\Controller",
        'make:model'        => "think\\console\\command\\make\\Model",
        'make:middleware'   => "think\\console\\command\\make\\Middleware",
        'make:validate'     => "think\\console\\command\\make\\Validate",
        'optimize:autoload' => "think\\console\\command\\optimize\\Autoload",
        'optimize:config'   => "think\\console\\command\\optimize\\Config",
        'optimize:schema'   => "think\\console\\command\\optimize\\Schema",
        'optimize:route'    => "think\\console\\command\\optimize\\Route",
        'run'               => "think\\console\\command\\RunServer",
        'version'           => "think\\console\\command\\Version",
        'route:list'        => "think\\console\\command\\RouteList",
    ];

    /**
     * Console constructor.
     * @access public
     * @param  string     $name    名称
     * @param  string     $version 版本

24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明

AI 解读 AI

登录后可用,每次 10 算力,解读结果公开显示在下面。

还没有人解读过这个文件。