Skip to content

Commit 1ad183b

Browse files
committed
RoutingPanel: added HTTP method
1 parent 22f7c1d commit 1ad183b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/Bridges/ApplicationTracy/RoutingPanel.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ public function getPanel()
8484
$source = $this->source;
8585
$hasModule = (bool) array_filter($routers, function($rq) { return $rq['module']; });
8686
$url = $this->httpRequest->getUrl();
87+
$method = $this->httpRequest->getMethod();
8788
require __DIR__ . '/templates/RoutingPanel.panel.phtml';
8889
return ob_get_clean();
8990
}

src/Bridges/ApplicationTracy/templates/RoutingPanel.panel.phtml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ use Tracy\Dumper;
8383
</table>
8484
<?php endif ?>
8585

86-
<p><code><?= htmlSpecialChars($url->getBaseUrl(), ENT_IGNORE, 'UTF-8') ?><span style="background:#eee; white-space:nowrap"><?= htmlSpecialChars($url->getRelativeUrl(), ENT_IGNORE, 'UTF-8') ?></span></code></p>
86+
<p><code><?= htmlSpecialChars($method, ENT_IGNORE, 'UTF-8') ?></code>
87+
<code><?= htmlSpecialChars($url->getBaseUrl(), ENT_IGNORE, 'UTF-8') ?><span style="background:#eee; white-space:nowrap"><?= htmlSpecialChars($url->getRelativeUrl(), ENT_IGNORE, 'UTF-8') ?></span></code></p>
8788

8889
<?php if ($source): ?>
8990
<p><a href="<?= htmlSpecialChars(Tracy\Helpers::editorUri($source->getFileName(), $source->getStartLine()), ENT_QUOTES, 'UTF-8') ?>"><?= $source instanceof \ReflectionClass ? $source->getName() : $source->getDeclaringClass()->getName() . '::' . $source->getName() . '()' ?></a></p>

0 commit comments

Comments
 (0)