[Debug] added some missing phpdocs
This commit is contained in:
parent
968764b531
commit
80e19e269a
|
@ -16,6 +16,7 @@ use Symfony\Component\Debug\Exception\ContextErrorException;
|
||||||
use Symfony\Component\Debug\Exception\FatalErrorException;
|
use Symfony\Component\Debug\Exception\FatalErrorException;
|
||||||
use Symfony\Component\Debug\FatalErrorHandler\UndefinedFunctionFatalErrorHandler;
|
use Symfony\Component\Debug\FatalErrorHandler\UndefinedFunctionFatalErrorHandler;
|
||||||
use Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler;
|
use Symfony\Component\Debug\FatalErrorHandler\ClassNotFoundFatalErrorHandler;
|
||||||
|
use Symfony\Component\Debug\FatalErrorHandler\FatalErrorHandlerInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ErrorHandler.
|
* ErrorHandler.
|
||||||
|
@ -57,7 +58,7 @@ class ErrorHandler
|
||||||
/**
|
/**
|
||||||
* Registers the error handler.
|
* Registers the error handler.
|
||||||
*
|
*
|
||||||
* @param integer $level The level at which the conversion to Exception is done (null to use the error_reporting() value and 0 to disable)
|
* @param integer $level The level at which the conversion to Exception is done (null to use the error_reporting() value and 0 to disable)
|
||||||
* @param Boolean $displayErrors Display errors (for dev environment) or just log they (production usage)
|
* @param Boolean $displayErrors Display errors (for dev environment) or just log they (production usage)
|
||||||
*
|
*
|
||||||
* @return The registered error handler
|
* @return The registered error handler
|
||||||
|
@ -76,16 +77,32 @@ class ErrorHandler
|
||||||
return $handler;
|
return $handler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the level at which the conversion to Exception is done.
|
||||||
|
*
|
||||||
|
* @param integer|null $level The level (null to use the error_reporting() value and 0 to disable)
|
||||||
|
*/
|
||||||
public function setLevel($level)
|
public function setLevel($level)
|
||||||
{
|
{
|
||||||
$this->level = null === $level ? error_reporting() : $level;
|
$this->level = null === $level ? error_reporting() : $level;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the display_errors flag value.
|
||||||
|
*
|
||||||
|
* @param integer $displayErrors The display_errors flag value
|
||||||
|
*/
|
||||||
public function setDisplayErrors($displayErrors)
|
public function setDisplayErrors($displayErrors)
|
||||||
{
|
{
|
||||||
$this->displayErrors = $displayErrors;
|
$this->displayErrors = $displayErrors;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets a logger for the given channel.
|
||||||
|
*
|
||||||
|
* @param LoggerInterface $logger A logger interface
|
||||||
|
* @param string $channel The channel associated with the logger (deprecation or emergency)
|
||||||
|
*/
|
||||||
public static function setLogger(LoggerInterface $logger, $channel = 'deprecation')
|
public static function setLogger(LoggerInterface $logger, $channel = 'deprecation')
|
||||||
{
|
{
|
||||||
self::$loggers[$channel] = $logger;
|
self::$loggers[$channel] = $logger;
|
||||||
|
@ -163,7 +180,14 @@ class ErrorHandler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getFatalErrorHandlers()
|
/**
|
||||||
|
* Gets the fatal error handlers.
|
||||||
|
*
|
||||||
|
* Override this method if you want to define more fatal error handlers.
|
||||||
|
*
|
||||||
|
* @return FatalErrorHandlerInterface[] An array of FatalErrorHandlerInterface
|
||||||
|
*/
|
||||||
|
protected function getFatalErrorHandlers()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
new UndefinedFunctionFatalErrorHandler(),
|
new UndefinedFunctionFatalErrorHandler(),
|
||||||
|
|
Reference in New Issue