summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorThomas Tanghus <thomas@tanghus.net>2013-10-05 16:59:06 +0200
committerThomas Tanghus <thomas@tanghus.net>2013-10-05 16:59:06 +0200
commitc85621a8971a99a6f811c470f50d9b0e89f957da (patch)
treeb1308a864cdf5687da9bd16433a31b5087930aea /lib
parent485bb100b3993af46f6c6be66bd79c563dbffaed (diff)
downloadnextcloud-server-c85621a8971a99a6f811c470f50d9b0e89f957da.tar.gz
nextcloud-server-c85621a8971a99a6f811c470f50d9b0e89f957da.zip
Make abstract Middleware class public
It doesn't make sense for subclasses to have to implement all methods.
Diffstat (limited to 'lib')
-rw-r--r--lib/private/appframework/middleware/middlewaredispatcher.php4
-rw-r--r--lib/private/appframework/middleware/security/securitymiddleware.php2
-rw-r--r--lib/public/appframework/middleware.php (renamed from lib/private/appframework/middleware/middleware.php)4
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/private/appframework/middleware/middlewaredispatcher.php b/lib/private/appframework/middleware/middlewaredispatcher.php
index 70ab108e6b8..5cce97b2167 100644
--- a/lib/private/appframework/middleware/middlewaredispatcher.php
+++ b/lib/private/appframework/middleware/middlewaredispatcher.php
@@ -26,7 +26,7 @@ namespace OC\AppFramework\Middleware;
use OC\AppFramework\Controller\Controller;
use OCP\AppFramework\Http\Response;
-
+use OCP\AppFramework\IMiddleWare;
/**
* This class is used to store and run all the middleware in correct order
@@ -58,7 +58,7 @@ class MiddlewareDispatcher {
* Adds a new middleware
* @param Middleware $middleware the middleware which will be added
*/
- public function registerMiddleware(Middleware $middleWare){
+ public function registerMiddleware(IMiddleware $middleWare){
array_push($this->middlewares, $middleWare);
}
diff --git a/lib/private/appframework/middleware/security/securitymiddleware.php b/lib/private/appframework/middleware/security/securitymiddleware.php
index 4f1447e1afb..d6daf737bb4 100644
--- a/lib/private/appframework/middleware/security/securitymiddleware.php
+++ b/lib/private/appframework/middleware/security/securitymiddleware.php
@@ -29,8 +29,8 @@ use OC\AppFramework\Http\Http;
use OC\AppFramework\Http\Request;
use OC\AppFramework\Http\RedirectResponse;
use OC\AppFramework\Utility\MethodAnnotationReader;
-use OC\AppFramework\Middleware\Middleware;
use OC\AppFramework\Core\API;
+use OCP\AppFramework\Middleware;
use OCP\AppFramework\Http\Response;
use OCP\AppFramework\Http\JSONResponse;
diff --git a/lib/private/appframework/middleware/middleware.php b/lib/public/appframework/middleware.php
index b12c03c3eb8..0f08eaef363 100644
--- a/lib/private/appframework/middleware/middleware.php
+++ b/lib/public/appframework/middleware.php
@@ -22,7 +22,7 @@
*/
-namespace OC\AppFramework\Middleware;
+namespace OCP\AppFramework;
use OCP\AppFramework\Http\Response;
@@ -33,7 +33,7 @@ use OCP\AppFramework\Http\Response;
* They're modeled after Django's middleware system:
* https://docs.djangoproject.com/en/dev/topics/http/middleware/
*/
-abstract class Middleware {
+abstract class Middleware implements IMiddleWare {
/**