forked from top-think/framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
62 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
// +---------------------------------------------------------------------- | ||
// | ThinkPHP [ WE CAN DO IT JUST THINK ] | ||
// +---------------------------------------------------------------------- | ||
// | Copyright (c) 2006-2015 http://thinkphp.cn All rights reserved. | ||
// +---------------------------------------------------------------------- | ||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 ) | ||
// +---------------------------------------------------------------------- | ||
// | Author: yunwuxin <[email protected]> | ||
// +---------------------------------------------------------------------- | ||
|
||
namespace think; | ||
|
||
|
||
use think\Console; | ||
|
||
class App | ||
{ | ||
/** | ||
* 执行应用程序 | ||
* @access public | ||
* @return void | ||
*/ | ||
public static function run() | ||
{ | ||
// 实例化console | ||
$console = new Console('Think Console', '0.1'); | ||
// 读取指令集 | ||
if (is_file(APP_PATH . 'command' . EXT)) { | ||
$commands = include APP_PATH . 'command' . EXT; | ||
if (is_array($commands)) { | ||
foreach ($commands as $command) { | ||
if (class_exists($command) && is_subclass_of($command, "\\think\\console\\command\\Command")) { | ||
// 注册指令 | ||
$console->add(new $command()); | ||
} | ||
} | ||
} | ||
} | ||
// 运行 | ||
$console->run(); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.