This commit is contained in:
as2252258@163.com
2021-08-31 01:48:34 +08:00
parent 6be3eb6499
commit 742867e2f9
+1 -6
View File
@@ -428,18 +428,13 @@ class Router extends HttpService implements RouterInterface
public function each(): array public function each(): array
{ {
$paths = []; $paths = [];
foreach ($this->nodes as $node) { foreach ($this->nodes as $_node) {
/** @var Node[] $node */ /** @var Node[] $node */
var_dump($node);
foreach ($node as $_node) {
if (!empty($_node->sourcePath)) { if (!empty($_node->sourcePath)) {
$path[] = ['method' => $_node->method, 'path' => $_node->sourcePath]; $path[] = ['method' => $_node->method, 'path' => $_node->sourcePath];
} }
var_dump($_node);
$paths = $this->getChildes($_node, $paths); $paths = $this->getChildes($_node, $paths);
} }
}
return $paths; return $paths;
} }