-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathartisan
executable file
·37 lines (24 loc) · 873 Bytes
/
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
#!/usr/bin/env php
<?php
define('DCR_START', microtime(true));
require __DIR__.'/vendor/autoload.php';
use DcrSwoole\Command\CommandBootstrap;
use DcrSwoole\Di\Container;
use DcrSwoole\Framework\Boostrap;
use Swoole\Runtime;
!defined('BASE_PATH') && define('BASE_PATH', __DIR__);
!defined('SWOOLE_HOOK_FLAGS') && define('SWOOLE_HOOK_FLAGS', SWOOLE_HOOK_ALL);
!defined('CONFIG_PATH') && define('CONFIG_PATH', (__DIR__) . '/config/');
!defined('PROJECT_ROOT') && define('PROJECT_ROOT', (__DIR__) . '/');
require BASE_PATH . '/vendor/autoload.php';
Runtime::enableCoroutine(SWOOLE_HOOK_FLAGS);
$time = set_time_limit(0);
try {
$container = Container::instance();
} catch (Exception $e) {
}
// 初始化 注册 config env db orm
/** @var Boostrap $bootstrap */
$bootstrap = $container->make(Boostrap::class);
$bootstrap->run();
CommandBootstrap::bootstrap();