Created
March 24, 2015 14:48
-
-
Save vcanales/9813fee091bca7e230c6 to your computer and use it in GitHub Desktop.
Really, really important.
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
/** | |
* @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