- Small change of isRoute method

This commit is contained in:
Dave M. 2025-02-03 01:29:06 +00:00
parent cebb213830
commit 2bc0c9e56f
2 changed files with 1 additions and 8 deletions

View File

@ -226,12 +226,6 @@ trait ControllerTrait {
#[Ignore]
public function isRoute(mixed $name, ServerRequestInterface $request) : bool
{
foreach((array) $name as $item) {
if ( fnmatch($item, $request->getAttribute('lean.route')->name) ) {
return true;
}
}
return false;
return $request->getAttribute('lean.route')->match($name);
}
}

View File

@ -1,6 +1,5 @@
<?php
namespace Lean;
use Psr\Container\ContainerInterface;