111
This commit is contained in:
@@ -430,7 +430,7 @@ class Router extends HttpService implements RouterInterface
|
|||||||
$paths = [];
|
$paths = [];
|
||||||
foreach ($this->nodes as $_node) {
|
foreach ($this->nodes as $_node) {
|
||||||
/** @var Node[] $node */
|
/** @var Node[] $node */
|
||||||
$paths[] = ['method' => $_node->method, 'path' => $_node->sourcePath];
|
$paths[] = ['method' => $_node->method, 'path' => $_node->sourcePath, 'alias' => $_node->getAlias()];
|
||||||
$paths = $this->getChildes($_node, $paths);
|
$paths = $this->getChildes($_node, $paths);
|
||||||
}
|
}
|
||||||
return $paths;
|
return $paths;
|
||||||
@@ -445,7 +445,7 @@ class Router extends HttpService implements RouterInterface
|
|||||||
private function getChildes(Node $node, array $path): array
|
private function getChildes(Node $node, array $path): array
|
||||||
{
|
{
|
||||||
foreach ($node->childes as $item) {
|
foreach ($node->childes as $item) {
|
||||||
$path[] = ['method' => $item->method, 'path' => $item->sourcePath];
|
$path[] = ['method' => $item->method, 'path' => $item->sourcePath, 'alias' => $item->getAlias()];
|
||||||
if (!empty($item->childes)) {
|
if (!empty($item->childes)) {
|
||||||
$path = $this->getChildes($item, $path);
|
$path = $this->getChildes($item, $path);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user