You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
944 B
43 lines
944 B
<?php
|
|
/**
|
|
* Part of the Fuel framework.
|
|
*
|
|
* @package Fuel
|
|
* @version 1.8
|
|
* @author Fuel Development Team
|
|
* @license MIT License
|
|
* @copyright 2010 - 2016 Fuel Development Team
|
|
* @link http://fuelphp.com
|
|
*/
|
|
|
|
namespace Fuel\Core;
|
|
|
|
abstract class HttpException extends \FuelException
|
|
{
|
|
/**
|
|
* Must return a response object for the handle method
|
|
*
|
|
* @return Response
|
|
*/
|
|
abstract protected function response();
|
|
|
|
/**
|
|
* When this type of exception isn't caught this method is called by
|
|
* Errorhandler::exception_handler() to deal with the problem.
|
|
*/
|
|
public function handle()
|
|
{
|
|
// get the exception response
|
|
$response = $this->response();
|
|
|
|
// fire any app shutdown events
|
|
\Event::instance()->trigger('shutdown', '', 'none', true);
|
|
|
|
// fire any framework shutdown events
|
|
\Event::instance()->trigger('fuel-shutdown', '', 'none', true);
|
|
|
|
// send the response out
|
|
$response->send(true);
|
|
}
|
|
}
|