From 23bfc34f1acc30e018001b762df47b0dd7dc6616 Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Mon, 19 Oct 2015 09:29:31 +0000 Subject: [PATCH] route : allow the routing to be chained : return $this each time git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@2369 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- route.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/route.php b/route.php index e7f4d74..c1c602a 100644 --- a/route.php +++ b/route.php @@ -276,7 +276,7 @@ class route { if ($this->debug) echo "==> Not a GET Method\n"; - return; + return $this; } return $this->map ($route, $function); @@ -298,7 +298,7 @@ class route { if ($this->debug) echo "==> Not a POST Method\n"; - return; + return $this; } return $this->map ($route, $function); @@ -320,7 +320,7 @@ class route { if ($this->debug) echo "==> Not a PUT Method\n"; - return; + return $this; } return $this->map ($route, $function); @@ -342,7 +342,7 @@ class route { if ($this->debug) echo "==> Not a DELETE Method\n"; - return; + return $this; } return $this->map ($route, $function); @@ -428,6 +428,7 @@ class route if ($this->debug) echo "==> NO MATCH\n"; + return $this; } /** Print an error page. If a custom page exists, use it