BUGFIX: not all paths were correct
This commit is contained in:
parent
7eb8d899bb
commit
bfadfbe721
|
@ -1,8 +1,7 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
session_start();
|
session_start();
|
||||||
|
require_once "../vendor/autoload.php";
|
||||||
require_once "vendor/autoload.php";
|
|
||||||
|
|
||||||
if( ini_get('safe_mode') ){
|
if( ini_get('safe_mode') ){
|
||||||
die("Cannot run in safe mode");
|
die("Cannot run in safe mode");
|
||||||
|
|
|
@ -4,7 +4,7 @@ namespace JeroenED\Framework;
|
||||||
|
|
||||||
|
|
||||||
use Doctrine\DBAL\Connection;
|
use Doctrine\DBAL\Connection;
|
||||||
use http\Env\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Twig\Environment;
|
use Twig\Environment;
|
||||||
use Twig\Loader\FilesystemLoader;
|
use Twig\Loader\FilesystemLoader;
|
||||||
|
|
|
@ -70,7 +70,7 @@ class Kernel
|
||||||
public function handle(): Response
|
public function handle(): Response
|
||||||
{
|
{
|
||||||
$this->parseDotEnv($this->getProjectDir() . '/.env');
|
$this->parseDotEnv($this->getProjectDir() . '/.env');
|
||||||
$routes = $this->parseRoutes($this->getConfigDir(), '/routes.yaml');
|
$routes = $this->parseRoutes($this->getConfigDir(), 'routes.yaml');
|
||||||
$request = $this->parseRequest();
|
$request = $this->parseRequest();
|
||||||
return $this->createResponse($request, $routes);
|
return $this->createResponse($request, $routes);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,8 +5,8 @@ use JeroenED\Framework\Kernel;
|
||||||
require_once '../bootstrap.php';
|
require_once '../bootstrap.php';
|
||||||
|
|
||||||
$kernel = new Kernel();
|
$kernel = new Kernel();
|
||||||
$kernel->setProjectDir(__DIR__);
|
$kernel->setProjectDir(__DIR__ . '/..');
|
||||||
$kernel->setConfigDir(__DIR__ . '/config/');
|
$kernel->setConfigDir(__DIR__ . '/../config/');
|
||||||
$kernel->setTemplateDir(__DIR__ . '/templates/');
|
$kernel->setTemplateDir(__DIR__ . '/../templates/');
|
||||||
|
|
||||||
$kernel->handle()->send();
|
$kernel->handle()->send();
|
Loading…
Reference in New Issue