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 |
ExceptionDataCollector.php
001 <?php
002
003 /*
004 * This file is part of the Symfony package.
005 *
006 * (c) Fabien Potencier <fabien@symfony.com>
007 *
008 * For the full copyright and license information, please view the LICENSE
009 * file that was distributed with this source code.
010 */
011
012 namespace Symfony\Component\HttpKernel\DataCollector;
013
014 use Symfony\Component\Debug\Exception\FlattenException;
015 use Symfony\Component\HttpFoundation\Request;
016 use Symfony\Component\HttpFoundation\Response;
017
018 /**
019 * ExceptionDataCollector.
020 *
021 * @author Fabien Potencier <fabien@symfony.com>
022 */
023 class ExceptionDataCollector extends DataCollector
024 {
025 /**
026 * {@inheritdoc}
027 */
028 public function collect(Request $request, Response $response, \Exception $exception = null)
029 {
030 if (null !== $exception) {
031 $this->data = array(
032 'exception' => FlattenException::create($exception),
033 );
034 }
035 }
036
037 /**
038 * Checks if the exception is not null.
039 *
040 * @return bool true if the exception is not null, false otherwise
041 */
042 public function hasException()
043 {
044 return isset($this->data['exception']);
045 }
046
047 /**
048 * Gets the exception.
049 *
050 * @return \Exception The exception
051 */
052 public function getException()
053 {
054 return $this->data['exception'];
055 }
056
057 /**
058 * Gets the exception message.
059 *
060 * @return string The exception message
061 */
062 public function getMessage()
063 {
064 return $this->data['exception']->getMessage();
065 }
066
067 /**
068 * Gets the exception code.
069 *
070 * @return int The exception code
071 */
072 public function getCode()
073 {
074 return $this->data['exception']->getCode();
075 }
076
077 /**
078 * Gets the status code.
079 *
080 * @return int The status code
081 */
082 public function getStatusCode()
083 {
084 return $this->data['exception']->getStatusCode();
085 }
086
087 /**
088 * Gets the exception trace.
089 *
090 * @return array The exception trace
091 */
092 public function getTrace()
093 {
094 return $this->data['exception']->getTrace();
095 }
096
097 /**
098 * {@inheritdoc}
099 */
100 public function getName()
101 {
102 return 'exception';
103 }
104 }
105