diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-08-20 21:05:55 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-08-20 21:05:55 +0200 |
commit | 25ebe495b834f25eefdfcca33b47626257061526 (patch) | |
tree | 083915126944532b3be088a9561995f6a9eca973 /lib/appframework | |
parent | f115b94927fedb4fd0c74c534e3766dae3244411 (diff) | |
download | nextcloud-server-25ebe495b834f25eefdfcca33b47626257061526.tar.gz nextcloud-server-25ebe495b834f25eefdfcca33b47626257061526.zip |
controller reuses IRequest methods
Diffstat (limited to 'lib/appframework')
-rw-r--r-- | lib/appframework/controller/controller.php | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/lib/appframework/controller/controller.php b/lib/appframework/controller/controller.php index 3e8166050d7..f6f34618ec6 100644 --- a/lib/appframework/controller/controller.php +++ b/lib/appframework/controller/controller.php @@ -63,9 +63,7 @@ abstract class Controller { * @return mixed the content of the array */ public function params($key, $default=null){ - return isset($this->request->parameters[$key]) - ? $this->request->parameters[$key] - : $default; + return $this->request->getParam($key, $default); } @@ -75,7 +73,7 @@ abstract class Controller { * @return array the array with all parameters */ public function getParams() { - return $this->request->parameters; + return $this->request->getParams(); } @@ -84,7 +82,7 @@ abstract class Controller { * @return string the method of the request (POST, GET, etc) */ public function method() { - return $this->request->method; + return $this->request->getMethod(); } @@ -94,7 +92,7 @@ abstract class Controller { * @return array the file in the $_FILES element */ public function getUploadedFile($key) { - return isset($this->request->files[$key]) ? $this->request->files[$key] : null; + return $this->request->getUploadedFile($key); } @@ -104,7 +102,7 @@ abstract class Controller { * @return array the value in the $_ENV element */ public function env($key) { - return isset($this->request->env[$key]) ? $this->request->env[$key] : null; + return $this->request->getEnv($key); } @@ -114,7 +112,7 @@ abstract class Controller { * @return array the value in the $_SESSION element */ public function session($key) { - return isset($this->request->session[$key]) ? $this->request->session[$key] : null; + return $this->request->getSession($key); } @@ -124,7 +122,7 @@ abstract class Controller { * @return array the value in the $_COOKIE element */ public function cookie($key) { - return isset($this->request->cookies[$key]) ? $this->request->cookies[$key] : null; + return $this->request->getCookie($key); } |