summaryrefslogtreecommitdiffstats
path: root/lib/public/appframework/controller.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/appframework/controller.php')
-rw-r--r--lib/public/appframework/controller.php13
1 files changed, 11 insertions, 2 deletions
diff --git a/lib/public/appframework/controller.php b/lib/public/appframework/controller.php
index 758f0a80083..f42eba172c7 100644
--- a/lib/public/appframework/controller.php
+++ b/lib/public/appframework/controller.php
@@ -28,7 +28,6 @@
namespace OCP\AppFramework;
use OCP\AppFramework\Http\TemplateResponse;
-use OCP\AppFramework\IAppContainer;
use OCP\IRequest;
@@ -49,12 +48,22 @@ abstract class Controller {
*/
protected $request;
+
/**
* constructor of the controller
* @param string $appName the name of the app
* @param IRequest $request an instance of the request
+ * @param string $corsMethods: comma seperated string of HTTP verbs which
+ * should be allowed for websites or webapps when calling your API, defaults to
+ * 'PUT, POST, GET, DELETE, PATCH'
+ * @param string $corsAllowedHeaders: comma seperated string of HTTP headers
+ * which should be allowed for websites or webapps when calling your API,
+ * defaults to 'Authorization, Content-Type, Accept'
+ * @param int $corsMaxAge number in seconds how long a preflighted OPTIONS
+ * request should be cached, defaults to 1728000 seconds
*/
- public function __construct($appName, IRequest $request){
+ public function __construct($appName,
+ IRequest $request){
$this->appName = $appName;
$this->request = $request;
}