Verzeichnisstruktur phpBB-3.1.0
- Veröffentlicht
- 27.10.2014
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 use Symfony\Component\ClassLoader\DebugClassLoader;
15
16 /**
17 * Registers all the debug tools.
18 *
19 * @author Fabien Potencier <fabien@symfony.com>
20 */
21 class Debug
22 {
23 private static $enabled = false;
24
25 /**
26 * Enables the debug tools.
27 *
28 * This method registers an error handler and an exception handler.
29 *
30 * If the Symfony ClassLoader component is available, a special
31 * class loader is also registered.
32 *
33 * @param int $errorReportingLevel The level of error reporting you want
34 * @param bool $displayErrors Whether to display errors (for development) or just log them (for production)
35 */
36 public static function enable($errorReportingLevel = null, $displayErrors = true)
37 {
38 if (static::$enabled) {
39 return;
40 }
41
42 static::$enabled = true;
43
44 error_reporting(-1);
45
46 ErrorHandler::register($errorReportingLevel, $displayErrors);
47 if ('cli' !== php_sapi_name()) {
48 ExceptionHandler::register();
49 // CLI - display errors only if they're not already logged to STDERR
50 } elseif ($displayErrors && (!ini_get('log_errors') || ini_get('error_log'))) {
51 ini_set('display_errors', 1);
52 }
53
54 if (class_exists('Symfony\Component\ClassLoader\DebugClassLoader')) {
55 DebugClassLoader::enable();
56 }
57 }
58 }
59