This commit is contained in:
2024-07-10 12:42:50 +03:00
parent e588866a92
commit 1c31a4e5c3
22 changed files with 2474 additions and 91 deletions

30
console/ConsoleController.php Executable file
View File

@ -0,0 +1,30 @@
<?php
namespace core\console;
use samejack\PHP\PHP_ArgvParser;
class ConsoleController
{
/**
* @var Out
*/
public $out;
protected $argv;
public function __construct()
{
$this->out = new Out();
$argv = $_SERVER['argv'];
unset($argv[0]);
unset($argv[1]);
if(!empty($argv)){
$argvParser = new PHP_ArgvParser();
$tmp = implode(" ", $argv);
$this->argv = $argvParser->parseConfigs($tmp);
}
}
}