début d'écriture de la classe principale Thelia

Elle hérite de Symfony\Component\HttpKernel\Kernel (/!\ aux interfaces)
mise en place d'un conteneur d'injection de dépendance à
modifier/compléter (voir comment gérer le chargement)
This commit is contained in:
Manuel Raynaud
2012-10-05 17:44:35 +02:00
parent 56446d0aa3
commit 47ccf66db5
5 changed files with 94 additions and 12 deletions

View File

@@ -0,0 +1,25 @@
<?php
if(is_file(__DIR__ . '/config_db.php')){
require __DIR__ . '/config_db.php';
}
else{
return false;
}
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Reference;
$container = new ContainerBuilder();
$container->register('database','Thelia\\Database\\Connection');
$container->register('http_kernel','Symfony\\Component\\HttpKernel\\HttpKernel');
$container->register('session','Symfony\\Component\\HttpFoundation\\Session\\Session');
return $container;
?>