- * @param Exception $e
- * @return void
- */
- protected function handleRoutingException(\Exception $e)
- {
- if ($e instanceof ResourceNotFoundException)
- {
- throw new NotFoundHttpException($e->getMessage());
- }
- }
- // The Symfony routing component's exceptions implement this interface we
- // can type-hint it to make sure we're only providing special handling
- // for those exceptions, and not other random exceptions that occur.
- catch (ExceptionInterface $e)
- {
- $this->handleRoutingException($e);
- }
- }
- // Once we have the route, we can just run it to get the responses, which will
- // always be instances of the Response class. Once we have the responses we
- // will execute the global "after" middlewares to finish off the request.
- else
- {
- $this->currentRoute = $route = $this->findRoute($request);
- $response = $route->run($request);
- if ($this->isDownForMaintenance())
- {
- $response = $this['events']->until('illuminate.app.down');
- if ( ! is_null($response)) return $this->prepareResponse($response, $request);
- }
- return $this['router']->dispatch($this->prepareRequest($request));
- }
- /**
- * Handles the given request and delivers the response.
- *
- * @return void
- */
- public function run()
- {
- $response = $this->dispatch($this['request']);
- $this['router']->callCloseFilter($this['request'], $response);
- | Once we have the application, we can simply call the run method,
- | which will execute the request and send the response back to
- | the client's browser allowing them to enjoy the creative
- | and wonderful applications we have created for them.
- |
- */
- $app->run();
- /*
Key | Value |
REDIRECT_STATUS | 200 |
HTTP_HOST | ninja-media-script.com |
HTTP_CONNECTION | keep-alive |
HTTP_ACCEPT | text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 |
HTTP_USER_AGENT | Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36 |
HTTP_ACCEPT_ENCODING | gzip, deflate, sdch |
HTTP_ACCEPT_LANGUAGE | en-US,en;q=0.8 |
PATH | /usr/bin:/bin:/usr/sbin:/sbin |
SERVER_SIGNATURE | |
SERVER_SOFTWARE | Apache |
SERVER_NAME | ninja-media-script.com |
SERVER_ADDR | 127.0.0.1 |
SERVER_PORT | 80 |
REMOTE_ADDR | 127.0.0.1 |
DOCUMENT_ROOT | /Users/tony/Documents/MAMP-sites/ninja-media-script |
SERVER_ADMIN | [email protected] |
SCRIPT_FILENAME | /Users/tony/Documents/MAMP-sites/ninja-media-script/index.php |
REMOTE_PORT | 51566 |
REDIRECT_URL | /signin |
GATEWAY_INTERFACE | CGI/1.1 |
SERVER_PROTOCOL | HTTP/1.1 |
REQUEST_METHOD | GET |
QUERY_STRING | |
REQUEST_URI | /signin |
SCRIPT_NAME | /index.php |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1418486930.2 |
REQUEST_TIME | 1418486930 |
argv | Array ( ) |
argc | 0 |
Key | Value |
_sf2_attributes | Array ( [_token] => OeE9UAuYet83CSowrKW098GqIRqclXRiTHVPq06K ) |
_sf2_flashes | Array ( ) |
_sf2_meta | Array ( [u] => 1418486930 [c] => 1418486930 [l] => 7200 ) |
Key | Value |
SHELL | /bin/zsh |
TMPDIR | /var/folders/ds/x2b0ddh93ln67_qtg4_dnllm0000gn/T/ |
Apple_PubSub_Socket_Render | /private/tmp/com.apple.launchd.PFOuDfHrNd/Render |
USER | tony |
SSH_AUTH_SOCK | /private/tmp/com.apple.launchd.wFp5mT22k2/Listeners |
__CF_USER_TEXT_ENCODING | 0x0:0:0 |
PATH | /usr/bin:/bin:/usr/sbin:/sbin |
PWD | / |
XPC_FLAGS | 0x0 |
XPC_SERVICE_NAME | 0 |
SHLVL | 1 |
HOME | /Users/tony |
DYLD_LIBRARY_PATH | /Applications/MAMP/Library/lib |
LOGNAME | tony |
_ | /Applications/MAMP/Library/bin/httpd |