App]
This commit is contained in:
28
kernel/console/ConsoleController.php
Executable file
28
kernel/console/ConsoleController.php
Executable file
@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace kernel\console;
|
||||
|
||||
|
||||
use kernel\console\Out;
|
||||
use samejack\PHP\ArgvParser;
|
||||
|
||||
class ConsoleController
|
||||
{
|
||||
public Out $out;
|
||||
protected array $argv;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->out = new Out();
|
||||
$argv = $_SERVER['argv'];
|
||||
unset($argv[0]);
|
||||
unset($argv[1]);
|
||||
if(!empty($argv)){
|
||||
$argvParser = new ArgvParser();
|
||||
$tmp = implode(" ", $argv);
|
||||
$this->argv = $argvParser->parseConfigs($tmp);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user