From e8fa25f9ca246fea085da46ea705a74b6de30d10 Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Sat, 29 Nov 2014 12:28:35 -0500 Subject: Replace Core\Cli by Symfony\Console --- app/Core/Cli.php | 75 -------------------------------------------------------- 1 file changed, 75 deletions(-) delete mode 100644 app/Core/Cli.php (limited to 'app/Core') diff --git a/app/Core/Cli.php b/app/Core/Cli.php deleted file mode 100644 index 13533b9a..00000000 --- a/app/Core/Cli.php +++ /dev/null @@ -1,75 +0,0 @@ -commands[$command] = $callback; - } - - /** - * Execute a command - * - * @access public - * @param string $command Command name - */ - public function call($command) - { - if (isset($this->commands[$command])) { - $this->commands[$command](); - exit; - } - } - - /** - * Determine which command to execute - * - * @access public - */ - public function execute() - { - if (php_sapi_name() !== 'cli') { - die('This script work only from the command line.'); - } - - if ($GLOBALS['argc'] === 1) { - $this->call($this->default_command); - } - - $this->call($GLOBALS['argv'][1]); - $this->call($this->default_command); - } -} -- cgit v1.2.3