move new interfaces into lib/public and OCP
This commit is contained in:
parent
97bdf008b1
commit
206f83941b
|
@ -132,7 +132,7 @@ class DIContainer extends SimpleContainer implements IAppContainer{
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return \OCP\Core\IServerContainer
|
* @return \OCP\IServerContainer
|
||||||
*/
|
*/
|
||||||
function getServer()
|
function getServer()
|
||||||
{
|
{
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
namespace OC\AppFramework\Http;
|
namespace OC\AppFramework\Http;
|
||||||
|
|
||||||
use OCP\Core\IRequest;
|
use OCP\IRequest;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class for accessing variables in the request.
|
* Class for accessing variables in the request.
|
||||||
|
|
|
@ -10,7 +10,7 @@ require_once __DIR__ . '/../../../3rdparty/Pimple/Pimple.php';
|
||||||
*
|
*
|
||||||
* SimpleContainer is a simple implementation of IContainer on basis of \Pimple
|
* 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
|
* @param string $name name of the service to query for
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
namespace OC {
|
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.
|
* This function is used to search and find contacts within the users address books.
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
namespace OCP\AppFramework;
|
namespace OCP\AppFramework;
|
||||||
|
|
||||||
use OCP\AppFramework\IApi;
|
use OCP\AppFramework\IApi;
|
||||||
use OCP\Core\IContainer;
|
use OCP\IContainer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class IAppContainer
|
* Class IAppContainer
|
||||||
|
@ -39,7 +39,7 @@ interface IAppContainer extends IContainer{
|
||||||
function getCoreApi();
|
function getCoreApi();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return \OCP\Core\IServerContainer
|
* @return \OCP\IServerContainer
|
||||||
*/
|
*/
|
||||||
function getServer();
|
function getServer();
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
|
|
||||||
// use OCP namespace for all classes that are considered public.
|
// 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
|
// 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.
|
* This class provides access to the contacts app. Use this class exclusively if you want to access contacts.
|
|
@ -20,14 +20,14 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace OCP\Core;
|
namespace OCP;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class IContainer
|
* Class IContainer
|
||||||
*
|
*
|
||||||
* IContainer is the basic interface to be used for any internal dependency injection mechanism
|
* IContainer is the basic interface to be used for any internal dependency injection mechanism
|
||||||
*
|
*
|
||||||
* @package OCP\Core
|
* @package OCP
|
||||||
*/
|
*/
|
||||||
interface IContainer {
|
interface IContainer {
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace OCP\Core;
|
namespace OCP;
|
||||||
|
|
||||||
|
|
||||||
interface IRequest {
|
interface IRequest {
|
|
@ -20,12 +20,12 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace OCP\Core;
|
namespace OCP;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class IServerContainer
|
* Class IServerContainer
|
||||||
* @package OCP\Core
|
* @package OCP
|
||||||
*
|
*
|
||||||
* This container holds all ownCloud services
|
* 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
|
* The contacts manager will act as a broker between consumers for contacts information and
|
||||||
* providers which actual deliver the contact information.
|
* providers which actual deliver the contact information.
|
||||||
*
|
*
|
||||||
* @return \OCP\Core\Contacts\IManager
|
* @return \OCP\Contacts\IManager
|
||||||
*/
|
*/
|
||||||
function getContactsManager();
|
function getContactsManager();
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ interface IServerContainer {
|
||||||
* is returned from this method.
|
* is returned from this method.
|
||||||
* In case the current execution was not initiated by a web request null is returned
|
* 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();
|
function getRequest();
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
namespace OC;
|
namespace OC;
|
||||||
|
|
||||||
use OC\AppFramework\Utility\SimpleContainer;
|
use OC\AppFramework\Utility\SimpleContainer;
|
||||||
use OCP\Core\IServerContainer;
|
use OCP\IServerContainer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Server
|
* Class Server
|
||||||
|
@ -20,9 +20,21 @@ class Server extends SimpleContainer implements IServerContainer {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return \OCP\Core\Contacts\IManager
|
* @return \OCP\Contacts\IManager
|
||||||
*/
|
*/
|
||||||
function getContactsManager() {
|
function getContactsManager() {
|
||||||
return $this->query('ContactsManager');
|
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');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue