* @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 |
PATH | /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin |
USER | fundacine |
HOME | /home/fundacine |
FCGI_ROLE | RESPONDER |
REDIRECT_UNIQUE_ID | ZgalFb0ufqMBOo4I-lVMBAAAAJE |
REDIRECT_HTTP_AUTHORIZATION | |
REDIRECT_SCRIPT_URL | /eventos |
REDIRECT_SCRIPT_URI | http://www.fundacine.org.br/eventos |
REDIRECT_STATUS | 200 |
UNIQUE_ID | ZgalFb0ufqMBOo4I-lVMBAAAAJE |
HTTP_AUTHORIZATION | |
SCRIPT_URL | /eventos |
SCRIPT_URI | http://www.fundacine.org.br/eventos |
HTTP_ACCEPT | */* |
HTTP_USER_AGENT | claudebot |
HTTP_HOST | www.fundacine.org.br |
HTTP_MAX_FORWARDS | 10 |
LD_LIBRARY_PATH | /usr/local/apache2/lib |
SERVER_SIGNATURE | |
SERVER_SOFTWARE | Apache |
SERVER_NAME | www.fundacine.org.br |
SERVER_ADDR | 191.6.208.25 |
SERVER_PORT | 80 |
REMOTE_ADDR | 3.218.247.159 |
DOCUMENT_ROOT | /home/fundacine/www/ |
REQUEST_SCHEME | http |
CONTEXT_PREFIX | |
CONTEXT_DOCUMENT_ROOT | /home/fundacine/www/ |
SERVER_ADMIN | fundacine@fundacine.org.br |
SCRIPT_FILENAME | //home/fundacine/www/index.php |
REMOTE_PORT | 60976 |
REDIRECT_URL | /eventos |
GATEWAY_INTERFACE | CGI/1.1 |
SERVER_PROTOCOL | HTTP/1.1 |
REQUEST_METHOD | GET |
QUERY_STRING | |
REQUEST_URI | /eventos |
SCRIPT_NAME | /index.php |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1711711509.75 |
REQUEST_TIME | 1711711509 |
argv | Array ( ) |
argc | 0 |
Key | Value |
_sf2_attributes | Array ( [_token] => m6xd6KEW5mZiLd5FLVHCfQmzEXKjBKFSkgumkTB0 ) |
_sf2_flashes | Array ( ) |
_sf2_meta | Array ( [u] => 1711711509 [c] => 1711711509 [l] => 7200 ) |
Key | Value |
PATH | /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin |
USER | fundacine |
HOME | /home/fundacine |
FCGI_ROLE | RESPONDER |
REDIRECT_UNIQUE_ID | ZgalFb0ufqMBOo4I-lVMBAAAAJE |
REDIRECT_HTTP_AUTHORIZATION | |
REDIRECT_SCRIPT_URL | /eventos |
REDIRECT_SCRIPT_URI | http://www.fundacine.org.br/eventos |
REDIRECT_STATUS | 200 |
UNIQUE_ID | ZgalFb0ufqMBOo4I-lVMBAAAAJE |
HTTP_AUTHORIZATION | |
SCRIPT_URL | /eventos |
SCRIPT_URI | http://www.fundacine.org.br/eventos |
HTTP_ACCEPT | */* |
HTTP_USER_AGENT | claudebot |
HTTP_HOST | www.fundacine.org.br |
HTTP_MAX_FORWARDS | 10 |
LD_LIBRARY_PATH | /usr/local/apache2/lib |
SERVER_SIGNATURE | |
SERVER_SOFTWARE | Apache |
SERVER_NAME | www.fundacine.org.br |
SERVER_ADDR | 191.6.208.25 |
SERVER_PORT | 80 |
REMOTE_ADDR | 3.218.247.159 |
DOCUMENT_ROOT | /home/fundacine/www/ |
REQUEST_SCHEME | http |
CONTEXT_PREFIX | |
CONTEXT_DOCUMENT_ROOT | /home/fundacine/www/ |
SERVER_ADMIN | fundacine@fundacine.org.br |
SCRIPT_FILENAME | //home/fundacine/www/index.php |
REMOTE_PORT | 60976 |
REDIRECT_URL | /eventos |
GATEWAY_INTERFACE | CGI/1.1 |
SERVER_PROTOCOL | HTTP/1.1 |
REQUEST_METHOD | GET |
QUERY_STRING | |
REQUEST_URI | /eventos |
SCRIPT_NAME | /index.php |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1711711509.75 |
REQUEST_TIME | 1711711509 |
argv | Array ( ) |
argc | 0 |