user table

This commit is contained in:
2024-07-30 12:27:44 +03:00
parent f24ce58b85
commit 9fb72b7840
5 changed files with 14 additions and 10 deletions

View File

@ -22,8 +22,9 @@ class App
{
$dispatcher = new Dispatcher(App::$collector->getData());
$response = $dispatcher->dispatch($_SERVER['REQUEST_METHOD'], parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH));
//header('Content-Type: ' . App::$responseType);
App::$header->set();
//header('Content-Type: ' . App::$responseType);
echo $response;
}

View File

@ -11,14 +11,14 @@ namespace kernel;
class Header
{
protected $list = [];
protected array $list = [];
public function add($key, $value)
public function add($key, $value): void
{
$this->list[$key] = $value;
}
public function set()
public function set(): void
{
foreach ($this->list as $key=>$v){
header($key . ": " . $v);