Skip to content

Commit 5243d4e

Browse files
committed
[WebProfilerBundle] show the http method in wdt if not 'GET'
When the request method is different from 'GET', the wdt add a hint before the route name in the request panel.
1 parent fbb17c4 commit 5243d4e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

DataCollector/RequestDataCollector.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ public function collect(Request $request, Response $response, \Exception $except
9090
$statusCode = $response->getStatusCode();
9191

9292
$this->data = array(
93+
'method' => $request->getMethod(),
9394
'format' => $request->getRequestFormat(),
9495
'content' => $content,
9596
'content_type' => $response->headers->get('Content-Type', 'text/html'),
@@ -156,6 +157,11 @@ public function collect(Request $request, Response $response, \Exception $except
156157
}
157158
}
158159

160+
public function getMethod()
161+
{
162+
return $this->data['method'];
163+
}
164+
159165
public function getPathInfo()
160166
{
161167
return $this->data['path_info'];

0 commit comments

Comments
 (0)