Merge pull request #18676 from owncloud/ext-eventdispatcher

files_external event dispatcher
This commit is contained in:
Robin McCorkell 2015-09-11 09:34:05 +01:00
commit e99988b9c7
2 changed files with 37 additions and 0 deletions

View File

@ -50,6 +50,11 @@ class Application extends App {
$this->loadBackends();
$this->loadAuthMechanisms();
// app developers: do NOT depend on this! it will disappear with oC 9.0!
\OC::$server->getEventDispatcher()->dispatch(
'OCA\\Files_External::loadAdditionalBackends'
);
}
/**

View File

@ -1061,4 +1061,36 @@ class Server extends SimpleContainer implements IServerContainer {
public function getSessionCryptoWrapper() {
return $this->query('CryptoWrapper');
}
/**
* Not a public API as of 8.2, wait for 9.0
* @return \OCA\Files_External\Service\BackendService
*/
public function getStoragesBackendService() {
return \OC_Mount_Config::$app->getContainer()->query('OCA\\Files_External\\Service\\BackendService');
}
/**
* Not a public API as of 8.2, wait for 9.0
* @return \OCA\Files_External\Service\GlobalStoragesService
*/
public function getGlobalStoragesService() {
return \OC_Mount_Config::$app->getContainer()->query('OCA\\Files_External\\Service\\GlobalStoragesService');
}
/**
* Not a public API as of 8.2, wait for 9.0
* @return \OCA\Files_External\Service\UserGlobalStoragesService
*/
public function getUserGlobalStoragesService() {
return \OC_Mount_Config::$app->getContainer()->query('OCA\\Files_External\\Service\\UserGlobalStoragesService');
}
/**
* Not a public API as of 8.2, wait for 9.0
* @return \OCA\Files_External\Service\UserStoragesService
*/
public function getUserStoragesService() {
return \OC_Mount_Config::$app->getContainer()->query('OCA\\Files_External\\Service\\UserStoragesService');
}
}