- Small change of isRoute method

This commit is contained in:
mcndave committed 2025-02-03 01:29:06 +00:00
1 parent cebb213830
commit 2bc0c9e56f
2 files changed
+1 -8

No files matched your search

+1 -7
View File
@@ -226,12 +226,6 @@ trait ControllerTrait {
#[Ignore] #[Ignore]
public function isRoute(mixed $name, ServerRequestInterface $request) : bool public function isRoute(mixed $name, ServerRequestInterface $request) : bool
{ {
foreach((array) $name as $item) { return $request->getAttribute('lean.route')->match($name);
if ( fnmatch($item, $request->getAttribute('lean.route')->name) ) {
return true;
}
}
return false;
} }
} }
-1
View File
@@ -1,6 +1,5 @@
<?php <?php
namespace Lean; namespace Lean;
use Psr\Container\ContainerInterface; use Psr\Container\ContainerInterface;