[ Index ]

PHP Cross Reference of phpBB-3.3.0-deutsch

title

Body

[close]

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

(no description)

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

Defines 1 class

ExceptionHandler:: (15 methods):
  __construct()
  register()
  setHandler()
  setFileLinkFormat()
  handle()
  sendPhpResponse()
  getHtml()
  getContent()
  getStylesheet()
  decorate()
  formatClass()
  formatPath()
  formatArgs()
  escapeHtml()
  getSymfonyGhostAsSvg()


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.

return: static
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

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

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

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

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

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.

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

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

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

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.

return: string
param: array $args The argument array

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


getSymfonyGhostAsSvg()   X-Ref
No description



Generated: Tue Apr 7 19:44:41 2020 Cross-referenced by PHPXref 0.7.1