From 97bdf008b1cefaa092e23fc5a9bad787e755ed77 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20M=C3=BCller?= <thomas.mueller@tmit.eu>
Date: Sat, 31 Aug 2013 20:57:16 +0200
Subject: [PATCH] PHPDoc added to existing interfaces

---
 lib/public/core/icontainer.php       | 25 +++++++++++++++++++++++++
 lib/public/core/irequest.php         |  8 ++++++--
 lib/public/core/iservercontainer.php | 13 +++++++++++++
 3 files changed, 44 insertions(+), 2 deletions(-)

diff --git a/lib/public/core/icontainer.php b/lib/public/core/icontainer.php
index 8c4a63424b..88ebc6cf64 100644
--- a/lib/public/core/icontainer.php
+++ b/lib/public/core/icontainer.php
@@ -31,9 +31,34 @@ namespace OCP\Core;
  */
 interface IContainer {
 
+	/**
+	 * Look up a service for a given name in the container.
+	 *
+	 * @param string $name
+	 * @return mixed
+	 */
 	function query($name);
 
+	/**
+	 * A value is stored in the container with it's corresponding name
+	 *
+	 * @param string $name
+	 * @param mixed $value
+	 * @return void
+	 */
 	function registerParameter($name, $value);
 
+	/**
+	 * A service is registered in the container where a closure is passed in which will actually
+	 * create the service on demand.
+	 * In case the parameter $shared is set to true (the default usage) the once created service will remain in
+	 * memory and be reused on subsequent calls.
+	 * In case the parameter is false the service will be recreated on every call.
+	 *
+	 * @param string $name
+	 * @param callable $closure
+	 * @param bool $shared
+	 * @return void
+	 */
 	function registerService($name, \Closure $closure, $shared = true);
 }
diff --git a/lib/public/core/irequest.php b/lib/public/core/irequest.php
index 6103215842..be60978a3c 100644
--- a/lib/public/core/irequest.php
+++ b/lib/public/core/irequest.php
@@ -45,6 +45,7 @@ interface IRequest {
 
 	/**
 	 * Returns all params that were received, be it from the request
+	 *
 	 * (as GET or POST) or through the URL by the route
 	 * @return array the array with all parameters
 	 */
@@ -52,12 +53,14 @@ interface IRequest {
 
 	/**
 	 * Returns the method of the request
+	 *
 	 * @return string the method of the request (POST, GET, etc)
 	 */
 	public function getMethod();
 
 	/**
 	 * Shortcut for accessing an uploaded file through the $_FILES array
+	 *
 	 * @param string $key the key that will be taken from the $_FILES array
 	 * @return array the file in the $_FILES element
 	 */
@@ -66,6 +69,7 @@ interface IRequest {
 
 	/**
 	 * Shortcut for getting env variables
+	 *
 	 * @param string $key the key that will be taken from the $_ENV array
 	 * @return array the value in the $_ENV element
 	 */
@@ -74,6 +78,7 @@ interface IRequest {
 
 	/**
 	 * Shortcut for getting session variables
+	 *
 	 * @param string $key the key that will be taken from the $_SESSION array
 	 * @return array the value in the $_SESSION element
 	 */
@@ -82,6 +87,7 @@ interface IRequest {
 
 	/**
 	 * Shortcut for getting cookie variables
+	 *
 	 * @param string $key the key that will be taken from the $_COOKIE array
 	 * @return array the value in the $_COOKIE element
 	 */
@@ -92,9 +98,7 @@ interface IRequest {
 	 * Returns the request body content.
 	 *
 	 * @param Boolean $asResource If true, a resource will be returned
-	 *
 	 * @return string|resource The request body content or a resource to read the body stream.
-	 *
 	 * @throws \LogicException
 	 */
 	function getContent($asResource = false);
diff --git a/lib/public/core/iservercontainer.php b/lib/public/core/iservercontainer.php
index e169990a3f..0517cc53e0 100644
--- a/lib/public/core/iservercontainer.php
+++ b/lib/public/core/iservercontainer.php
@@ -32,7 +32,20 @@ namespace OCP\Core;
 interface IServerContainer {
 
 	/**
+	 * The contacts manager will act as a broker between consumers for contacts information and
+	 * providers which actual deliver the contact information.
+	 *
 	 * @return \OCP\Core\Contacts\IManager
 	 */
 	function getContactsManager();
+
+	/**
+	 * The current request object holding all information about the request currently being processed
+	 * is returned from this method.
+	 * In case the current execution was not initiated by a web request null is returned
+	 *
+	 * @return \OCP\Core\IRequest|null
+	 */
+	function getRequest();
+
 }
-- 
GitLab