mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 00:37:52 +00:00
[FEATURE] Bugfixes and optimisations
- Changed Middleware to interface - as it's easier to inherit and use in other frameworks/projects. - RouterController now loads method based on request-method. - Changed references to old Middleware abstract class. - Middleware must now be instance of IMiddleware instead of Middleware class.
This commit is contained in:
@@ -13,7 +13,7 @@ class RouterGroup extends RouterEntry {
|
||||
public function renderRoute(Request $request) {
|
||||
// Check if request method is allowed
|
||||
|
||||
if(strtolower($request->getUri()) == strtolower($this->prefix) || stripos($request->getUri(), $this->prefix) === 0) {
|
||||
if(trim($this->prefix) === '' || strtolower($request->getUri()) == strtolower($this->prefix) || stripos($request->getUri(), $this->prefix) === 0) {
|
||||
|
||||
$hasAccess = (!$this->method);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user