Created
February 21, 2014 13:38
-
-
Save KuiKui/9134373 to your computer and use it in GitHub Desktop.
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 | |
$resource = new Question($id); | |
$persistentResource = new PersistentQuestion($resource, $this->get('redis_db')); | |
if (!$persistentResource->load(true)) { | |
throw new NotFoundHttpException(sprintf('Question with id %s not found', $id)); | |
} | |
return new View($persistentResource->getObject(), 200); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment