Skip to content

Commit

Permalink
fixed request data collector
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Sep 27, 2010
1 parent bda264b commit 9e50782
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
Expand Up @@ -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())) ?>
Expand Up @@ -74,7 +74,7 @@ public function getResponseHeaders()

public function getSessionAttributes()
{
return new HeaderBag($this->data['session_attributes']);
return $this->data['session_attributes'];
}

public function getContentType()
Expand Down

0 comments on commit 9e50782

Please sign in to comment.