-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcubex
More file actions
executable file
·30 lines (22 loc) · 722 Bytes
/
cubex
File metadata and controls
executable file
·30 lines (22 loc) · 722 Bytes
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
#!/usr/bin/env php
<?php
/**
* Cubex Console Application
*/
//Defining PHP_START will allow cubex to add an execution time header
define('PHP_START', microtime(true));
//Include the composer autoloader
require_once __DIR__ . '/vendor/autoload.php';
//Create an instance of cubex, with the bin root defined
$app = new \Cubex\Cubex(__DIR__ . DIRECTORY_SEPARATOR . 'public/');
//Boot Cubex
$app->boot();
//Create a request object
$request = \Cubex\Http\Request::createConsoleRequest();
$app->instance('request', $request);
//Create a new console application
$console = \Cubex\Console\Console::withCubex($app);
//Execute the command and retrieve the exit code
$exit = $console->run();
$app->shutdown();
exit($exit);