Add console

This commit is contained in:
Tim 2023-08-16 14:33:21 +02:00
parent 59200be680
commit 1ee5c1c992
4 changed files with 29 additions and 2 deletions

1
app/bin.php Normal file → Executable file
View File

@ -1,3 +1,4 @@
#!/usr/bin/env php
<?php <?php
use App\Kernel; use App\Kernel;

View File

@ -8,7 +8,7 @@ error_reporting(E_ALL);
use App\Kernel; use App\Kernel;
use Ardent\Undercurrent\Config\AppConfig; use Ardent\Undercurrent\Config\AppConfig;
use Ardent\Undercurrent\Http\Renderer; use Ardent\Undercurrent\Kernel\Renderer;
require_once dirname(__DIR__) . '/vendor/autoload.php'; require_once dirname(__DIR__) . '/vendor/autoload.php';

21
src/Kernel/Console.php Normal file
View File

@ -0,0 +1,21 @@
<?php
namespace Ardent\Undercurrent\Kernel;
use Ardent\Undercurrent\Container\ContainerInterface;
class Console
{
public function __construct(
private readonly ContainerInterface $container,
)
{
}
public function run(): void
{
$argv = $_SERVER['argv'];
dump($argv);
}
}

View File

@ -1,8 +1,13 @@
<?php <?php
namespace Ardent\Undercurrent\Http; namespace Ardent\Undercurrent\Kernel;
use Ardent\Undercurrent\Container\ContainerInterface; use Ardent\Undercurrent\Container\ContainerInterface;
use Ardent\Undercurrent\Http\GenericRequest;
use Ardent\Undercurrent\Http\GenericResponse;
use Ardent\Undercurrent\Http\MethodEnum;
use Ardent\Undercurrent\Http\RouterInterface;
use Ardent\Undercurrent\Http\StatusEnum;
use Ardent\Undercurrent\Logger\LogContainer; use Ardent\Undercurrent\Logger\LogContainer;
class Renderer class Renderer