Skip to content

Instantly share code, notes, and snippets.

@vcanales
Created March 24, 2015 14:48
Show Gist options
  • Save vcanales/9813fee091bca7e230c6 to your computer and use it in GitHub Desktop.
Save vcanales/9813fee091bca7e230c6 to your computer and use it in GitHub Desktop.
Really, really important.
/**
* @Route("/teapot/brew/{slug}");
*/
# THE MOST IMPORTANT METHOD ON THIS APPLICATION
public function teapotAction($slug = '') {
$response = new Response();
if ($slug != 'tea') {
$response->setStatusCode(Response::HTTP_I_AM_A_TEAPOT);
} else {
$response->setStatusCode(Response::HTTP_OK);
}
return $response;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment