[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:
Simon Sessingø
2015-11-01 08:23:46 +01:00
parent 637b998f02
commit 8557741083
6 changed files with 37 additions and 6 deletions
+1 -1
View File
@@ -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);