Skip to content

Commit

Permalink
Convert Event objects to readable properties
Browse files Browse the repository at this point in the history
For Laravel 5.2
  • Loading branch information
barryvdh committed Jan 1, 2016
1 parent 5c1fef4 commit 2fa3c0c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/DataCollector/EventCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

use DebugBar\DataCollector\TimeDataCollector;
use Illuminate\Events\Dispatcher;
use Illuminate\Support\Str;
use Symfony\Component\HttpKernel\DataCollector\Util\ValueExporter;

class EventCollector extends TimeDataCollector
Expand Down Expand Up @@ -75,6 +76,9 @@ protected function prepareParams($params)
{
$data = array();
foreach ($params as $key => $value) {
if (is_object($value) && Str::is('Illuminate\*\Events\*', get_class($value))) {
$value = $this->prepareParams(get_object_vars($value));
}
$data[$key] = htmlentities($this->exporter->exportValue($value), ENT_QUOTES, 'UTF-8', false);
}

Expand Down

0 comments on commit 2fa3c0c

Please sign in to comment.