Skip to content

Instantly share code, notes, and snippets.

@KuiKui
Created February 21, 2014 13:38
Show Gist options
  • Save KuiKui/9134373 to your computer and use it in GitHub Desktop.
Save KuiKui/9134373 to your computer and use it in GitHub Desktop.
<?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