Skip to content
This repository has been archived by the owner on Apr 17, 2019. It is now read-only.

Commit

Permalink
Cubex Console
Browse files Browse the repository at this point in the history
  • Loading branch information
bajb committed Mar 3, 2014
1 parent 9071cbe commit 809b4c8
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions cubex
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/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';

if(!\Packaged\Helpers\System::isWindows())
{
//Clear the screen
echo "\033[2J\033[;H";
}

//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);

0 comments on commit 809b4c8

Please sign in to comment.