|
|
@ -2,7 +2,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
require_once __DIR__ . '/../vendor/autoload.php';
|
|
|
|
require_once __DIR__ . '/../vendor/autoload.php';
|
|
|
|
require_once __DIR__ . '/../config/config.php';
|
|
|
|
require_once __DIR__ . '/../config/config.php';
|
|
|
|
|
|
|
|
echo "hello";
|
|
|
|
use App\AppCreator;
|
|
|
|
use App\AppCreator;
|
|
|
|
use App\Router\Middleware\LoggingMiddleware;
|
|
|
|
use App\Router\Middleware\LoggingMiddleware;
|
|
|
|
use App\Router\Request\RequestFactory;
|
|
|
|
use App\Router\Request\RequestFactory;
|
|
|
@ -36,6 +36,7 @@ use Twig\Loader\FilesystemLoader;
|
|
|
|
use Shared\IHashPassword;
|
|
|
|
use Shared\IHashPassword;
|
|
|
|
use Shared\HashPassword;
|
|
|
|
use Shared\HashPassword;
|
|
|
|
use Shared\Log;
|
|
|
|
use Shared\Log;
|
|
|
|
|
|
|
|
|
|
|
|
$appFactory = new AppCreator();
|
|
|
|
$appFactory = new AppCreator();
|
|
|
|
$appFactory->registerService(IArgumentResolver::class, ArgumentControllerResolver::class);
|
|
|
|
$appFactory->registerService(IArgumentResolver::class, ArgumentControllerResolver::class);
|
|
|
|
$appFactory->registerSingleton(UserManager::class, UserManager::class);
|
|
|
|
$appFactory->registerSingleton(UserManager::class, UserManager::class);
|
|
|
@ -48,7 +49,7 @@ $appFactory->registerService(INotificationRepository::class, NotificationReposit
|
|
|
|
$appFactory->registerService(IUserRepository::class, UserRepository::class);
|
|
|
|
$appFactory->registerService(IUserRepository::class, UserRepository::class);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo "hallo";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -62,8 +63,11 @@ $appFactory->registerService(\Twig\Environment::class,\Twig\Environment::class);
|
|
|
|
// $databaseContext = DatabaseContext::getInstance();
|
|
|
|
// $databaseContext = DatabaseContext::getInstance();
|
|
|
|
|
|
|
|
|
|
|
|
$appFactory->AddControllers();
|
|
|
|
$appFactory->AddControllers();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo "holla";
|
|
|
|
$app = $appFactory->create();
|
|
|
|
$app = $appFactory->create();
|
|
|
|
if (!is_null($app)){
|
|
|
|
if (!is_null($app)){
|
|
|
|
|
|
|
|
echo "va bien te faire ...";
|
|
|
|
// Ajout des Middleware
|
|
|
|
// Ajout des Middleware
|
|
|
|
/*$app->use(new LoggingMiddleware());*/
|
|
|
|
/*$app->use(new LoggingMiddleware());*/
|
|
|
|
$app->use(new AuthMiddleware($appFactory->getDicontainer()->get(IAuthService::class) ));
|
|
|
|
$app->use(new AuthMiddleware($appFactory->getDicontainer()->get(IAuthService::class) ));
|
|
|
@ -72,3 +76,4 @@ if (!is_null($app)){
|
|
|
|
$app->run(RequestFactory::createFromGlobals());
|
|
|
|
$app->run(RequestFactory::createFromGlobals());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
echo "meerde";
|
|
|
|