public function FlattenException::toArray

File

drupal/core/vendor/symfony/http-kernel/Symfony/Component/HttpKernel/Exception/FlattenException.php, line 61

Class

FlattenException
FlattenException wraps a PHP Exception to be able to serialize it.

Namespace

Symfony\Component\HttpKernel\Exception

Code

public function toArray() {
  $exceptions = array();
  foreach (array_merge(array(
    $this,
  ), $this
    ->getAllPrevious()) as $exception) {
    $exceptions[] = array(
      'message' => $exception
        ->getMessage(),
      'class' => $exception
        ->getClass(),
      'trace' => $exception
        ->getTrace(),
    );
  }
  return $exceptions;
}