summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/App/AppStore/Fetcher/AppFetcher.php8
-rw-r--r--lib/private/App/AppStore/Fetcher/CategoryFetcher.php8
-rw-r--r--lib/private/App/AppStore/Fetcher/Fetcher.php7
-rw-r--r--lib/private/AppFramework/DependencyInjection/DIContainer.php2
-rw-r--r--lib/private/Security/IdentityProof/Manager.php7
-rw-r--r--lib/private/Server.php20
-rw-r--r--lib/private/Updater.php1
7 files changed, 19 insertions, 34 deletions
diff --git a/lib/private/App/AppStore/Fetcher/AppFetcher.php b/lib/private/App/AppStore/Fetcher/AppFetcher.php
index e020390988e..2e181d754f1 100644
--- a/lib/private/App/AppStore/Fetcher/AppFetcher.php
+++ b/lib/private/App/AppStore/Fetcher/AppFetcher.php
@@ -22,24 +22,24 @@
namespace OC\App\AppStore\Fetcher;
use OC\App\AppStore\Version\VersionParser;
+use OC\Files\AppData\Factory;
use OCP\AppFramework\Utility\ITimeFactory;
-use OCP\Files\IAppData;
use OCP\Http\Client\IClientService;
use OCP\IConfig;
class AppFetcher extends Fetcher {
/**
- * @param IAppData $appData
+ * @param Factory $appDataFactory
* @param IClientService $clientService
* @param ITimeFactory $timeFactory
* @param IConfig $config;
*/
- public function __construct(IAppData $appData,
+ public function __construct(Factory $appDataFactory,
IClientService $clientService,
ITimeFactory $timeFactory,
IConfig $config) {
parent::__construct(
- $appData,
+ $appDataFactory,
$clientService,
$timeFactory,
$config
diff --git a/lib/private/App/AppStore/Fetcher/CategoryFetcher.php b/lib/private/App/AppStore/Fetcher/CategoryFetcher.php
index 8b79259a66a..4c786652833 100644
--- a/lib/private/App/AppStore/Fetcher/CategoryFetcher.php
+++ b/lib/private/App/AppStore/Fetcher/CategoryFetcher.php
@@ -21,24 +21,24 @@
namespace OC\App\AppStore\Fetcher;
+use OC\Files\AppData\Factory;
use OCP\AppFramework\Utility\ITimeFactory;
-use OCP\Files\IAppData;
use OCP\Http\Client\IClientService;
use OCP\IConfig;
class CategoryFetcher extends Fetcher {
/**
- * @param IAppData $appData
+ * @param Factory $appDataFactory
* @param IClientService $clientService
* @param ITimeFactory $timeFactory
* @param IConfig $config
*/
- public function __construct(IAppData $appData,
+ public function __construct(Factory $appDataFactory,
IClientService $clientService,
ITimeFactory $timeFactory,
IConfig $config) {
parent::__construct(
- $appData,
+ $appDataFactory,
$clientService,
$timeFactory,
$config
diff --git a/lib/private/App/AppStore/Fetcher/Fetcher.php b/lib/private/App/AppStore/Fetcher/Fetcher.php
index 5354d334eb1..ccf5162ed82 100644
--- a/lib/private/App/AppStore/Fetcher/Fetcher.php
+++ b/lib/private/App/AppStore/Fetcher/Fetcher.php
@@ -21,6 +21,7 @@
namespace OC\App\AppStore\Fetcher;
+use OC\Files\AppData\Factory;
use OCP\AppFramework\Http;
use OCP\AppFramework\Utility\ITimeFactory;
use OCP\Files\IAppData;
@@ -47,16 +48,16 @@ abstract class Fetcher {
protected $version;
/**
- * @param IAppData $appData
+ * @param Factory $appDataFactory
* @param IClientService $clientService
* @param ITimeFactory $timeFactory
* @param IConfig $config
*/
- public function __construct(IAppData $appData,
+ public function __construct(Factory $appDataFactory,
IClientService $clientService,
ITimeFactory $timeFactory,
IConfig $config) {
- $this->appData = $appData;
+ $this->appData = $appDataFactory->get('appstore');
$this->clientService = $clientService;
$this->timeFactory = $timeFactory;
$this->config = $config;
diff --git a/lib/private/AppFramework/DependencyInjection/DIContainer.php b/lib/private/AppFramework/DependencyInjection/DIContainer.php
index 04747485c13..d24836228cc 100644
--- a/lib/private/AppFramework/DependencyInjection/DIContainer.php
+++ b/lib/private/AppFramework/DependencyInjection/DIContainer.php
@@ -165,7 +165,7 @@ class DIContainer extends SimpleContainer implements IAppContainer {
$this->registerService(\OC\Security\IdentityProof\Manager::class, function ($c) {
return new \OC\Security\IdentityProof\Manager(
- $this->getServer()->getAppDataDir('identityproof'),
+ $this->getServer()->query(\OC\Files\AppData\Factory::class),
$this->getServer()->getCrypto()
);
});
diff --git a/lib/private/Security/IdentityProof/Manager.php b/lib/private/Security/IdentityProof/Manager.php
index d2a9e57e338..73edac5f747 100644
--- a/lib/private/Security/IdentityProof/Manager.php
+++ b/lib/private/Security/IdentityProof/Manager.php
@@ -21,6 +21,7 @@
namespace OC\Security\IdentityProof;
+use OC\Files\AppData\Factory;
use OCP\Files\IAppData;
use OCP\IUser;
use OCP\Security\ICrypto;
@@ -32,12 +33,12 @@ class Manager {
private $crypto;
/**
- * @param IAppData $appData
+ * @param Factory $appDataFactory
* @param ICrypto $crypto
*/
- public function __construct(IAppData $appData,
+ public function __construct(Factory $appDataFactory,
ICrypto $crypto) {
- $this->appData = $appData;
+ $this->appData = $appDataFactory->get('identityproof');
$this->crypto = $crypto;
}
diff --git a/lib/private/Server.php b/lib/private/Server.php
index 9731bd294e8..9d54421e3e9 100644
--- a/lib/private/Server.php
+++ b/lib/private/Server.php
@@ -420,24 +420,8 @@ class Server extends ServerContainer implements IServerContainer {
$this->registerService('AppHelper', function ($c) {
return new \OC\AppHelper();
});
- $this->registerService(AppFetcher::class, function ($c) {
- return new AppFetcher(
- $this->getAppDataDir('appstore'),
- $this->getHTTPClientService(),
- $this->query(TimeFactory::class),
- $this->getConfig()
- );
- });
$this->registerAlias('AppFetcher', AppFetcher::class);
-
- $this->registerService('CategoryFetcher', function ($c) {
- return new CategoryFetcher(
- $this->getAppDataDir('appstore'),
- $this->getHTTPClientService(),
- $this->query(TimeFactory::class),
- $this->getConfig()
- );
- });
+ $this->registerAlias('CategoryFetcher', CategoryFetcher::class);
$this->registerService(\OCP\ICache::class, function ($c) {
return new Cache\File();
@@ -1290,7 +1274,7 @@ class Server extends ServerContainer implements IServerContainer {
* @return AppFetcher
*/
public function getAppFetcher() {
- return $this->query('AppFetcher');
+ return $this->query(AppFetcher::class);
}
/**
diff --git a/lib/private/Updater.php b/lib/private/Updater.php
index 5c4a7725a1b..023b3e6972c 100644
--- a/lib/private/Updater.php
+++ b/lib/private/Updater.php
@@ -32,7 +32,6 @@
namespace OC;
-use OC\App\AppStore\Fetcher\AppFetcher;
use OC\Hooks\BasicEmitter;
use OC\IntegrityCheck\Checker;
use OC_App;