Created
March 22, 2013 08:22
-
-
Save parap/5219737 to your computer and use it in GitHub Desktop.
test gist
This file contains 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 characters
<?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(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment