Files
sterivein/index_dev.php
Manuel Raynaud 69ac78c790 sauvegarde 10/10/2012
Début d'implémentation du controlleur / matcher pour le routing
Voir http://dev.thelia.net/index.php?title=Routing
2012-10-10 18:07:08 +02:00

33 lines
568 B
PHP

<?php
use Symfony\Component\HttpFoundation\Request;
use Thelia\Core\Thelia;
//use Symfony\Component\DependencyInjection;
$env = 'debug';
require __DIR__ . '/core/bootstrap.php';
$trustIp = array(
'::1',
'127.0.0.1'
);
$request = Request::createFromGlobals();
if( false === in_array($request->getClientIp(), $trustIp)){
//change request to send to a 404 error page
}
$thelia = new Thelia('dev', true);
//var_dump($thelia->getContainer());
$response = $thelia->handle($request)->prepare($request)->send();
$thelia->terminate($request, $reponse);
?>