Created
March 22, 2013 08:22
Revisions
-
parap created this gist
Mar 22, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ <?php use Symfony\Component\HttpFoundation\Request; use frontend\model\Initializer; include_once('config.php'); include_once('lib/autoload.php'); include_once('app/bootstrap.php'); $initializer = new Initializer(); $initializer->kernel(); $initializer->doctrine(); $kernel = $initializer->getKernel(); $request = Request::createFromGlobals(); try { $repo = $initializer->getEntityManager()->getRepository('frontend\model\entity\User'); $results = $repo->findAll(); var_dump($results); $response = $kernel->handle($request); $response->send(); $kernel->terminate($request, $response); } catch (Exception $e) { //TODO: improve 404 handle echo '404: ' . $e->getMessage(); }