[ Index ]

PHP Cross Reference of phpBB-3.2.8-deutsch

title

Body

[close]

/vendor/symfony/debug/ -> ExceptionHandler.php (summary)

(no description)

File Size: 490 lines (19 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

ExceptionHandler:: (19 methods):
  __construct()
  register()
  setHandler()
  setFileLinkFormat()
  handle()
  failSafeHandle()
  sendPhpResponse()
  createResponse()
  getHtml()
  getContent()
  getStylesheet()
  decorate()
  formatClass()
  formatPath()
  formatArgs()
  utf8Htmlize()
  escapeHtml()
  catchOutput()
  cleanOutput()


Class: ExceptionHandler  - X-Ref

ExceptionHandler converts an exception to a Response object.

It is mostly useful in debug mode to replace the default PHP/XDebug
output with something prettier and more useful.

As this class is mainly used during Kernel boot, where nothing is yet
available, the Response content is always HTML.

__construct($debug = true, $charset = null, $fileLinkFormat = null)   X-Ref
No description

register($debug = true, $charset = null, $fileLinkFormat = null)   X-Ref
Registers the exception handler.

param: bool        $debug          Enable/disable debug mode, where the stack trace is displayed
param: string|null $charset        The charset used by exception messages
param: string|null $fileLinkFormat The IDE link template
return: static

setHandler($handler)   X-Ref
Sets a user exception handler.

param: callable $handler An handler that will be called on Exception
return: callable|null The previous exception handler if any

setFileLinkFormat($format)   X-Ref
Sets the format for links to source files.

param: string $format The format for links to source files
return: string The previous file link format

handle(\Exception $exception)   X-Ref
Sends a response for the given Exception.

To be as fail-safe as possible, the exception is first handled
by our simple exception handler, then by the user exception handler.
The latter takes precedence and any output from the former is cancelled,
if and only if nothing bad happens in this handling path.

failSafeHandle(\Exception $exception)   X-Ref
Sends a response for the given Exception.

If you have the Symfony HttpFoundation component installed,
this method will use it to create and send the response. If not,
it will fallback to plain PHP functions.

sendPhpResponse($exception)   X-Ref
Sends the error associated with the given Exception as a plain PHP response.

This method uses plain PHP functions like header() and echo to output
the response.

param: \Exception|FlattenException $exception An \Exception or FlattenException instance

createResponse($exception)   X-Ref
Creates the error Response associated with the given Exception.

param: \Exception|FlattenException $exception An \Exception or FlattenException instance
return: Response A Response instance

getHtml($exception)   X-Ref
Gets the full HTML content associated with the given exception.

param: \Exception|FlattenException $exception An \Exception or FlattenException instance
return: string The HTML content as a string

getContent(FlattenException $exception)   X-Ref
Gets the HTML content associated with the given exception.

return: string The content as a string

getStylesheet(FlattenException $exception)   X-Ref
Gets the stylesheet associated with the given exception.

return: string The stylesheet as a string

decorate($content, $css)   X-Ref
No description

formatClass($class)   X-Ref
No description

formatPath($path, $line)   X-Ref
No description

formatArgs(array $args)   X-Ref
Formats an array as a string.

param: array $args The argument array
return: string

utf8Htmlize($str)   X-Ref
Returns an UTF-8 and HTML encoded string.


escapeHtml($str)   X-Ref
HTML-encodes a string.


catchOutput($buffer)   X-Ref


cleanOutput($buffer)   X-Ref




Generated: Tue Apr 7 19:42:26 2020 Cross-referenced by PHPXref 0.7.1