[Pkg-owncloud-commits] [owncloud] 118/239: AppFramework(Controller|HTTP|HTTP-Responses|Middleware), IContainer API fixes

David Prévot taffit at moszumanska.debian.org
Fri Nov 29 01:32:26 UTC 2013


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit bc8cc9142e08611104cdc4df9d518775ef576066
Author: Morris Jobke <morris.jobke at gmail.com>
Date:   Mon Nov 25 16:28:24 2013 +0100

    AppFramework(Controller|HTTP|HTTP-Responses|Middleware), IContainer API fixes
---
 lib/public/appframework/controller.php            |  7 ++++++
 lib/public/appframework/http.php                  |  8 ++++++-
 lib/public/appframework/http/jsonresponse.php     | 11 +++++++++-
 lib/public/appframework/http/response.php         |  4 ++++
 lib/public/appframework/http/templateresponse.php | 26 ++++++++++++++++++++++-
 lib/public/appframework/middleware.php            |  4 ++++
 lib/public/icontainer.php                         |  2 +-
 7 files changed, 58 insertions(+), 4 deletions(-)

diff --git a/lib/public/appframework/controller.php b/lib/public/appframework/controller.php
index 320e0cf..dc8da96 100644
--- a/lib/public/appframework/controller.php
+++ b/lib/public/appframework/controller.php
@@ -20,6 +20,10 @@
  *
  */
 
+/**
+ * Public interface of ownCloud for apps to use.
+ * AppFramework\Controller class
+ */
 
 namespace OCP\AppFramework;
 
@@ -34,16 +38,19 @@ use OCP\IRequest;
 abstract class Controller {
 
 	/**
+	 * app container for dependency injection
 	 * @var \OCP\AppFramework\IAppContainer
 	 */
 	protected $app;
 
 	/**
+	 * current request
 	 * @var \OCP\IRequest
 	 */
 	protected $request;
 
 	/**
+	 * constructor of the controller
 	 * @param IAppContainer $app interface to the app
 	 * @param IRequest $request an instance of the request
 	 */
diff --git a/lib/public/appframework/http.php b/lib/public/appframework/http.php
index c584d4e..60f3142 100644
--- a/lib/public/appframework/http.php
+++ b/lib/public/appframework/http.php
@@ -20,10 +20,16 @@
  *
  */
 
+/**
+ * Public interface of ownCloud for apps to use.
+ * AppFramework\HTTP class
+ */
 
 namespace OCP\AppFramework;
 
-
+/**
+ * Base class which contains constants for HTTP status codes
+ */
 class Http {
 
 	const STATUS_CONTINUE = 100;
diff --git a/lib/public/appframework/http/jsonresponse.php b/lib/public/appframework/http/jsonresponse.php
index 7c2b609..b54b23a 100644
--- a/lib/public/appframework/http/jsonresponse.php
+++ b/lib/public/appframework/http/jsonresponse.php
@@ -20,6 +20,10 @@
  *
  */
 
+/**
+ * Public interface of ownCloud for apps to use.
+ * AppFramework\HTTP\JSONResponse class
+ */
 
 namespace OCP\AppFramework\Http;
 
@@ -30,10 +34,15 @@ use OCP\AppFramework\Http;
  */
 class JSONResponse extends Response {
 
+	/**
+	 * response data
+	 * @var array|object
+	 */
 	protected $data;
 
 
 	/**
+	 * constructor of JSONResponse
 	 * @param array|object $data the object or array that should be transformed
 	 * @param int $statusCode the Http status code, defaults to 200
 	 */
@@ -55,7 +64,7 @@ class JSONResponse extends Response {
 
 	/**
 	 * Sets values in the data json array
-	 * @param array|object $params an array or object which will be transformed
+	 * @param array|object $data an array or object which will be transformed
 	 *                             to JSON
 	 */
 	public function setData($data){
diff --git a/lib/public/appframework/http/response.php b/lib/public/appframework/http/response.php
index f776878..0f5a18c 100644
--- a/lib/public/appframework/http/response.php
+++ b/lib/public/appframework/http/response.php
@@ -20,6 +20,10 @@
  *
  */
 
+/**
+ * Public interface of ownCloud for apps to use.
+ * AppFramework\HTTP\Response class
+ */
 
 namespace OCP\AppFramework\Http;
 
diff --git a/lib/public/appframework/http/templateresponse.php b/lib/public/appframework/http/templateresponse.php
index 6156f80..2200a38 100644
--- a/lib/public/appframework/http/templateresponse.php
+++ b/lib/public/appframework/http/templateresponse.php
@@ -20,6 +20,10 @@
  *
  */
 
+/**
+ * Public interface of ownCloud for apps to use.
+ * AppFramework\HTTP\TemplateResponse class
+ */
 
 namespace OCP\AppFramework\Http;
 
@@ -29,14 +33,34 @@ namespace OCP\AppFramework\Http;
  */
 class TemplateResponse extends Response {
 
+	/**
+	 * name of the template
+	 * @var string
+	 */
 	protected $templateName;
+
+	/**
+	 * parameters
+	 * @var array
+	 */
 	protected $params;
+
+	/**
+	 * rendering type (admin, user, blank)
+	 * @var string
+	 */
 	protected $renderAs;
+
+	/**
+	 * app name
+	 * @var string
+	 */
 	protected $appName;
 
 	/**
-	 * @param string $templateName the name of the template
+	 * constructor of TemplateResponse
 	 * @param string $appName the name of the app to load the template from
+	 * @param string $templateName the name of the template
 	 */
 	public function __construct($appName, $templateName) {
 		$this->templateName = $templateName;
diff --git a/lib/public/appframework/middleware.php b/lib/public/appframework/middleware.php
index c4ee1c0..24f3193 100644
--- a/lib/public/appframework/middleware.php
+++ b/lib/public/appframework/middleware.php
@@ -20,6 +20,10 @@
  *
  */
 
+/**
+ * Public interface of ownCloud for apps to use.
+ * AppFramework\Middleware class
+ */
 
 namespace OCP\AppFramework;
 
diff --git a/lib/public/icontainer.php b/lib/public/icontainer.php
index 6b7052c..eaffa5d 100644
--- a/lib/public/icontainer.php
+++ b/lib/public/icontainer.php
@@ -64,7 +64,7 @@ interface IContainer {
 	 * In case the parameter is false the service will be recreated on every call.
 	 *
 	 * @param string $name
-	 * @param callable $closure
+	 * @param \Closure $closure
 	 * @param bool $shared
 	 * @return void
 	 */

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list