fixed request data collector

This commit is contained in:
Fabien Potencier 2010-09-27 21:17:37 +02:00
parent bda264bb81
commit 9e50782b9d
2 changed files with 26 additions and 2 deletions

View File

@ -36,4 +36,28 @@
<h2>Response Session Attributes</h2>
<?php echo $view->render('WebProfilerBundle:Profiler:bag', array('bag' => $data->getSessionAttributes())) ?>
<table>
<tr>
<th>Key</th>
<th>Value</th>
</tr>
<?php foreach ($data->getSessionAttributes()->getRawValue() as $key => $value): ?>
<tr>
<th><?php echo $key ?></th>
<td>
<?php if (is_object($value)): ?>
<em>Object</em>
<?php elseif (is_resource($value)): ?>
<em>Resource</em>
<?php elseif (is_array($value)): ?>
<em>Array</em>
<?php else: ?>
<?php echo $value ?>
<?php endif; ?>
</td>
</tr>
<?php endforeach; ?>
</table>
<?php //echo $view->render('WebProfilerBundle:Profiler:bag', array('bag' => $data->getSessionAttributes())) ?>

View File

@ -74,7 +74,7 @@ class RequestDataCollector extends DataCollector
public function getSessionAttributes()
{
return new HeaderBag($this->data['session_attributes']);
return $this->data['session_attributes'];
}
public function getContentType()