Add console
This commit is contained in:
		
							
								
								
									
										1
									
								
								app/bin.php
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										1
									
								
								app/bin.php
									
									
									
									
									
										
										
										Normal file → Executable file
									
								
							| @@ -1,3 +1,4 @@ | |||||||
|  | #!/usr/bin/env php | ||||||
| <?php | <?php | ||||||
|  |  | ||||||
| use App\Kernel; | use App\Kernel; | ||||||
|   | |||||||
| @@ -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
									
								
							
							
						
						
									
										21
									
								
								src/Kernel/Console.php
									
									
									
									
									
										Normal 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); | ||||||
|  |     } | ||||||
|  | } | ||||||
| @@ -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 | ||||||
		Reference in New Issue
	
	Block a user