- Small change of isRoute method
This commit is contained in:
parent
cebb213830
commit
2bc0c9e56f
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace Lean;
|
||||
|
||||
use Psr\Container\ContainerInterface;
|
||||
|
Loading…
x
Reference in New Issue
Block a user