-
Notifications
You must be signed in to change notification settings - Fork 7
/
forge
executable file
·55 lines (36 loc) · 1.77 KB
/
forge
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
#!/usr/bin/env php
<?php
//--------------------------------------------------------------------------
// Define The Application Paths
//--------------------------------------------------------------------------
defined('DS') || define('DS', DIRECTORY_SEPARATOR);
/** Define the absolute paths for configured directories. */
define('BASEPATH', realpath(__DIR__) .DS);
define('APPPATH', BASEPATH .'app' .DS);
define('WEBPATH', BASEPATH .'webroot' .DS);
//--------------------------------------------------------------------------
// Register The Auto Loader
//--------------------------------------------------------------------------
require BASEPATH .'vendor' .DS .'autoload.php';
//--------------------------------------------------------------------------
// Turn On The Lights
//--------------------------------------------------------------------------
$app = require_once APPPATH .'Platform' .DS .'Bootstrap.php';
//--------------------------------------------------------------------------
// Load The Forge Console Application
//--------------------------------------------------------------------------
use Nova\Console\Application as ConsoleApplication;
$app->setRequestForConsoleEnvironment();
$forge = ConsoleApplication::start($app);
//--------------------------------------------------------------------------
// Run The Forge Application
//--------------------------------------------------------------------------
$status = $forge->handle(
$input = new Symfony\Component\Console\Input\ArgvInput,
new Symfony\Component\Console\Output\ConsoleOutput
);
//--------------------------------------------------------------------------
// Shutdown The Application
//--------------------------------------------------------------------------
$app->terminate();
exit($status);