Initial commit
This commit is contained in:
commit
73c6b816c0
716 changed files with 170045 additions and 0 deletions
95
kirby/vendor/filp/whoops/src/Whoops/Handler/Handler.php
vendored
Normal file
95
kirby/vendor/filp/whoops/src/Whoops/Handler/Handler.php
vendored
Normal file
|
@ -0,0 +1,95 @@
|
|||
<?php
|
||||
/**
|
||||
* Whoops - php errors for cool kids
|
||||
* @author Filipe Dobreira <http://github.com/filp>
|
||||
*/
|
||||
|
||||
namespace Whoops\Handler;
|
||||
|
||||
use Whoops\Exception\Inspector;
|
||||
use Whoops\RunInterface;
|
||||
|
||||
/**
|
||||
* Abstract implementation of a Handler.
|
||||
*/
|
||||
abstract class Handler implements HandlerInterface
|
||||
{
|
||||
/*
|
||||
Return constants that can be returned from Handler::handle
|
||||
to message the handler walker.
|
||||
*/
|
||||
const DONE = 0x10; // returning this is optional, only exists for
|
||||
// semantic purposes
|
||||
/**
|
||||
* The Handler has handled the Throwable in some way, and wishes to skip any other Handler.
|
||||
* Execution will continue.
|
||||
*/
|
||||
const LAST_HANDLER = 0x20;
|
||||
/**
|
||||
* The Handler has handled the Throwable in some way, and wishes to quit/stop execution
|
||||
*/
|
||||
const QUIT = 0x30;
|
||||
|
||||
/**
|
||||
* @var RunInterface
|
||||
*/
|
||||
private $run;
|
||||
|
||||
/**
|
||||
* @var Inspector $inspector
|
||||
*/
|
||||
private $inspector;
|
||||
|
||||
/**
|
||||
* @var \Throwable $exception
|
||||
*/
|
||||
private $exception;
|
||||
|
||||
/**
|
||||
* @param RunInterface $run
|
||||
*/
|
||||
public function setRun(RunInterface $run)
|
||||
{
|
||||
$this->run = $run;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return RunInterface
|
||||
*/
|
||||
protected function getRun()
|
||||
{
|
||||
return $this->run;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Inspector $inspector
|
||||
*/
|
||||
public function setInspector(Inspector $inspector)
|
||||
{
|
||||
$this->inspector = $inspector;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Inspector
|
||||
*/
|
||||
protected function getInspector()
|
||||
{
|
||||
return $this->inspector;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param \Throwable $exception
|
||||
*/
|
||||
public function setException($exception)
|
||||
{
|
||||
$this->exception = $exception;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Throwable
|
||||
*/
|
||||
protected function getException()
|
||||
{
|
||||
return $this->exception;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue