forked from laravel/laravel
-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathartisan
executable file
·70 lines (60 loc) · 2.47 KB
/
artisan
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
#!/usr/bin/env php
<?php
/**
* translator:昌维 <[email protected]>
* repository:https://github.com/cw1997/laravel-Simplified-Chinese
* Translated at 2016-11-09 21:14:47
*/
/*
|--------------------------------------------------------------------------
| Register The Auto Loader
| 注册自动加载器
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader
| for our application. We just need to utilize it! We'll require it
| into the script here so that we do not have to worry about the
| loading of any our classes "manually". Feels great to relax.
| Composer提供了一个方便的,自动为我们的应用程序生成类的加载器
| 因为我们在这个脚本中导入了这个文件,
| 所以我们完全不需要担心如何手动加载我们自己的类,这种感觉很轻松。
|
*/
require __DIR__.'/bootstrap/autoload.php';
$app = require_once __DIR__.'/bootstrap/app.php';
/*
|--------------------------------------------------------------------------
| Run The Artisan Application
| 运行Artisan应用
|--------------------------------------------------------------------------
|
| When we run the console application, the current CLI command will be
| executed in this console and the response sent back to a terminal
| or another output device for the developers. Here goes nothing!
| 当我们运行这个命令行应用的时候,
| 这个CLI根命令将会在这个命令行中执行并且将响应发回给终端,
| 或者发回给开发者的其他输出设备,
| 这里将不会做任何事情。
|
*/
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
$status = $kernel->handle(
$input = new Symfony\Component\Console\Input\ArgvInput,
new Symfony\Component\Console\Output\ConsoleOutput
);
/*
|--------------------------------------------------------------------------
| Shutdown The Application
| 关闭应用
|--------------------------------------------------------------------------
|
| Once Artisan has finished running. We will fire off the shutdown events
| so that any final work may be done by the application before we shut
| down the process. This is the last thing to happen to the request.
| 一旦这个应用运行完毕,我们将触发关闭事件,
| 所以该应用的任何收尾工作都会在我们关闭这个进程前执行。
| 这是这个请求该做的最后一件事情
|
*/
$kernel->terminate($input, $status);
exit($status);