Verzeichnisstruktur phpBB-3.2.0
- Veröffentlicht
- 06.01.2017
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
Debug.php
01 <?php
02
03 /*
04 * This file is part of the Symfony package.
05 *
06 * (c) Fabien Potencier <fabien@symfony.com>
07 *
08 * For the full copyright and license information, please view the LICENSE
09 * file that was distributed with this source code.
10 */
11
12 namespace Symfony\Component\Debug;
13
14 /**
15 * Registers all the debug tools.
16 *
17 * @author Fabien Potencier <fabien@symfony.com>
18 */
19 class Debug
20 {
21 private static $enabled = false;
22
23 /**
24 * Enables the debug tools.
25 *
26 * This method registers an error handler and an exception handler.
27 *
28 * If the Symfony ClassLoader component is available, a special
29 * class loader is also registered.
30 *
31 * @param int $errorReportingLevel The level of error reporting you want
32 * @param bool $displayErrors Whether to display errors (for development) or just log them (for production)
33 */
34 public static function enable($errorReportingLevel = null, $displayErrors = true)
35 {
36 if (static::$enabled) {
37 return;
38 }
39
40 static::$enabled = true;
41
42 if (null !== $errorReportingLevel) {
43 error_reporting($errorReportingLevel);
44 } else {
45 error_reporting(-1);
46 }
47
48 if ('cli' !== PHP_SAPI) {
49 ini_set('display_errors', 0);
50 ExceptionHandler::register();
51 } elseif ($displayErrors && (!ini_get('log_errors') || ini_get('error_log'))) {
52 // CLI - display errors only if they're not already logged to STDERR
53 ini_set('display_errors', 1);
54 }
55 if ($displayErrors) {
56 ErrorHandler::register(new ErrorHandler(new BufferingLogger()));
57 } else {
58 ErrorHandler::register()->throwAt(0, true);
59 }
60
61 DebugClassLoader::enable();
62 }
63 }
64