move new interfaces into lib/public and OCP

This commit is contained in:
Thomas Müller 2013-08-31 21:34:29 +02:00
parent 97bdf008b1
commit 206f83941b
10 changed files with 28 additions and 16 deletions

View File

@ -132,7 +132,7 @@ class DIContainer extends SimpleContainer implements IAppContainer{
}
/**
* @return \OCP\Core\IServerContainer
* @return \OCP\IServerContainer
*/
function getServer()
{

View File

@ -22,7 +22,7 @@
namespace OC\AppFramework\Http;
use OCP\Core\IRequest;
use OCP\IRequest;
/**
* Class for accessing variables in the request.

View File

@ -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

View File

@ -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.

View File

@ -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();
}

View File

@ -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.

View File

@ -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 {

View File

@ -20,7 +20,7 @@
*
*/
namespace OCP\Core;
namespace OCP;
interface IRequest {

View File

@ -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();

View File

@ -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');
}
}