改名
This commit is contained in:
@@ -445,7 +445,6 @@ class Router extends HttpService implements RouterInterface
|
|||||||
foreach ($this->nodes as $node) {
|
foreach ($this->nodes as $node) {
|
||||||
/** @var Node[] $node */
|
/** @var Node[] $node */
|
||||||
foreach ($node as $_node) {
|
foreach ($node as $_node) {
|
||||||
$path[] = ['method' => $_node->method, 'path' => $_node->sourcePath];
|
|
||||||
$paths = $this->getChildes($_node, $paths);
|
$paths = $this->getChildes($_node, $paths);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -461,7 +460,9 @@ 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) {
|
||||||
|
if (!empty($_node->sourcePath)) {
|
||||||
$path[] = ['method' => $item->method, 'path' => $item->sourcePath];
|
$path[] = ['method' => $item->method, 'path' => $item->sourcePath];
|
||||||
|
}
|
||||||
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