getData()); $response = $dispatcher->dispatch($_SERVER['REQUEST_METHOD'], parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH)); header('Content-Type: ' . App::$responseType); App::$header->set(); echo $response; } public function load(): static { App::$collector = new CgRouteCollector(); $this->setRouting(); return $this; } public function setRouting(): void { include ROOT_DIR . "/rout.php"; } public static function create(): App { return new self(); } }