for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of the Divergence package.
*
* (c) Henry Paradiz <[email protected]>
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Divergence\CLI;
use Divergence\CLI\Env;
use \League\CLImate\CLImate;
use Divergence\CLI\Controllers\Commands\Basics;
use Divergence\CLI\Controllers\Commands\Config;
use Divergence\CLI\Controllers\Commands\Tester;
use Divergence\CLI\Controllers\CommandLineHandler;
use Divergence\CLI\Controllers\Commands\Initialize;
class Command extends CommandLineHandler
{
public static $climate; // instance of \League\CLImate\CLImate;
public static function getClimate()
return static::$climate;
}
public static function handle()
Env::getEnvironment();
Env::$me = static::shiftArgs();
static::$climate = new CLImate();
//static::$climate->style->addCommand('orange', '38;5;208' /*'38;5;208'*/);
//static::$climate->orange('test'); exit;
switch ($action = static::shiftArgs()) {
$action
case 'init':
Initialize::init();
break;
case 'status':
Basics::status();
case 'config':
Config::handle();
// no break
case 'build':
// Divergence\Controllers\Builder::handle();
case 'test':
Tester::handle();
case '-v':
case '--version':
Basics::version();
case '--help':
case '-h':
case 'help':
default:
Basics::usage();