summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2013-08-31 21:34:29 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2013-08-31 21:34:29 +0200
commit206f83941b26b16f89e695ae84b998e9cf11132a (patch)
treee19b0f42c4edda179d1f684694653ddf973050af
parent97bdf008b1cefaa092e23fc5a9bad787e755ed77 (diff)
downloadnextcloud-server-206f83941b26b16f89e695ae84b998e9cf11132a.tar.gz
nextcloud-server-206f83941b26b16f89e695ae84b998e9cf11132a.zip
move new interfaces into lib/public and OCP
-rw-r--r--lib/appframework/dependencyinjection/dicontainer.php2
-rw-r--r--lib/appframework/http/request.php2
-rw-r--r--lib/appframework/utility/simplecontainer.php2
-rw-r--r--lib/contactsmanager.php2
-rw-r--r--lib/public/appframework/iappcontainer.php4
-rw-r--r--lib/public/contacts/imanager.php (renamed from lib/public/core/contacts/imanager.php)2
-rw-r--r--lib/public/icontainer.php (renamed from lib/public/core/icontainer.php)4
-rw-r--r--lib/public/irequest.php (renamed from lib/public/core/irequest.php)2
-rw-r--r--lib/public/iservercontainer.php (renamed from lib/public/core/iservercontainer.php)8
-rw-r--r--lib/server.php16
10 files changed, 28 insertions, 16 deletions
diff --git a/lib/appframework/dependencyinjection/dicontainer.php b/lib/appframework/dependencyinjection/dicontainer.php
index 43f6eee29b0..2ef885d7b2c 100644
--- a/lib/appframework/dependencyinjection/dicontainer.php
+++ b/lib/appframework/dependencyinjection/dicontainer.php
@@ -132,7 +132,7 @@ class DIContainer extends SimpleContainer implements IAppContainer{
}
/**
- * @return \OCP\Core\IServerContainer
+ * @return \OCP\IServerContainer
*/
function getServer()
{
diff --git a/lib/appframework/http/request.php b/lib/appframework/http/request.php
index ab72a8db697..4f1775182a1 100644
--- a/lib/appframework/http/request.php
+++ b/lib/appframework/http/request.php
@@ -22,7 +22,7 @@
namespace OC\AppFramework\Http;
-use OCP\Core\IRequest;
+use OCP\IRequest;
/**
* Class for accessing variables in the request.
diff --git a/lib/appframework/utility/simplecontainer.php b/lib/appframework/utility/simplecontainer.php
index 04b6cd727b8..a51ace83a37 100644
--- a/lib/appframework/utility/simplecontainer.php
+++ b/lib/appframework/utility/simplecontainer.php
@@ -10,7 +10,7 @@ require_once __DIR__ . '/../../../3rdparty/Pimple/Pimple.php';
*
* SimpleContainer is a simple implementation of IContainer on basis of \Pimple
*/
-class SimpleContainer extends \Pimple implements \OCP\Core\IContainer {
+class SimpleContainer extends \Pimple implements \OCP\IContainer {
/**
* @param string $name name of the service to query for
diff --git a/lib/contactsmanager.php b/lib/contactsmanager.php
index 59c413ec03b..fc6745b4505 100644
--- a/lib/contactsmanager.php
+++ b/lib/contactsmanager.php
@@ -22,7 +22,7 @@
namespace OC {
- class ContactsManager implements \OCP\Core\Contacts\IManager {
+ class ContactsManager implements \OCP\Contacts\IManager {
/**
* This function is used to search and find contacts within the users address books.
diff --git a/lib/public/appframework/iappcontainer.php b/lib/public/appframework/iappcontainer.php
index db909241e5d..c8f6229dd9e 100644
--- a/lib/public/appframework/iappcontainer.php
+++ b/lib/public/appframework/iappcontainer.php
@@ -23,7 +23,7 @@
namespace OCP\AppFramework;
use OCP\AppFramework\IApi;
-use OCP\Core\IContainer;
+use OCP\IContainer;
/**
* Class IAppContainer
@@ -39,7 +39,7 @@ interface IAppContainer extends IContainer{
function getCoreApi();
/**
- * @return \OCP\Core\IServerContainer
+ * @return \OCP\IServerContainer
*/
function getServer();
}
diff --git a/lib/public/core/contacts/imanager.php b/lib/public/contacts/imanager.php
index e8bb7bfd8e4..3bfbca7be50 100644
--- a/lib/public/core/contacts/imanager.php
+++ b/lib/public/contacts/imanager.php
@@ -28,7 +28,7 @@
// use OCP namespace for all classes that are considered public.
// This means that they should be used by apps instead of the internal ownCloud classes
-namespace OCP\Core\Contacts {
+namespace OCP\Contacts {
/**
* This class provides access to the contacts app. Use this class exclusively if you want to access contacts.
diff --git a/lib/public/core/icontainer.php b/lib/public/icontainer.php
index 88ebc6cf64d..d43c1c90f11 100644
--- a/lib/public/core/icontainer.php
+++ b/lib/public/icontainer.php
@@ -20,14 +20,14 @@
*
*/
-namespace OCP\Core;
+namespace OCP;
/**
* Class IContainer
*
* IContainer is the basic interface to be used for any internal dependency injection mechanism
*
- * @package OCP\Core
+ * @package OCP
*/
interface IContainer {
diff --git a/lib/public/core/irequest.php b/lib/public/irequest.php
index be60978a3c3..cd39855950b 100644
--- a/lib/public/core/irequest.php
+++ b/lib/public/irequest.php
@@ -20,7 +20,7 @@
*
*/
-namespace OCP\Core;
+namespace OCP;
interface IRequest {
diff --git a/lib/public/core/iservercontainer.php b/lib/public/iservercontainer.php
index 0517cc53e09..5f5b9677549 100644
--- a/lib/public/core/iservercontainer.php
+++ b/lib/public/iservercontainer.php
@@ -20,12 +20,12 @@
*
*/
-namespace OCP\Core;
+namespace OCP;
/**
* Class IServerContainer
- * @package OCP\Core
+ * @package OCP
*
* This container holds all ownCloud services
*/
@@ -35,7 +35,7 @@ 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
+ * @return \OCP\Contacts\IManager
*/
function getContactsManager();
@@ -44,7 +44,7 @@ interface IServerContainer {
* 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
+ * @return \OCP\IRequest|null
*/
function getRequest();
diff --git a/lib/server.php b/lib/server.php
index 72c82efe16b..ad955bf5c65 100644
--- a/lib/server.php
+++ b/lib/server.php
@@ -3,7 +3,7 @@
namespace OC;
use OC\AppFramework\Utility\SimpleContainer;
-use OCP\Core\IServerContainer;
+use OCP\IServerContainer;
/**
* Class Server
@@ -20,9 +20,21 @@ class Server extends SimpleContainer implements IServerContainer {
}
/**
- * @return \OCP\Core\Contacts\IManager
+ * @return \OCP\Contacts\IManager
*/
function getContactsManager() {
return $this->query('ContactsManager');
}
+
+ /**
+ * 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\IRequest|null
+ */
+ function getRequest()
+ {
+ return $this->query('Request');
+ }
}