You are here

public function ExceptionHandler::__construct in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/debug/ExceptionHandler.php \Symfony\Component\Debug\ExceptionHandler::__construct()

File

vendor/symfony/debug/ExceptionHandler.php, line 39

Class

ExceptionHandler
ExceptionHandler converts an exception to a Response object.

Namespace

Symfony\Component\Debug

Code

public function __construct($debug = true, $charset = null, $fileLinkFormat = null) {
  if (false !== strpos($charset, '%')) {

    // Swap $charset and $fileLinkFormat for BC reasons
    $pivot = $fileLinkFormat;
    $fileLinkFormat = $charset;
    $charset = $pivot;
  }
  $this->debug = $debug;
  $this->charset = $charset ?: ini_get('default_charset') ?: 'UTF-8';
  $this->fileLinkFormat = $fileLinkFormat ?: ini_get('xdebug.file_link_format') ?: get_cfg_var('xdebug.file_link_format');
}