summaryrefslogtreecommitdiffstats
path: root/lib/private/server.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/server.php')
-rw-r--r--lib/private/server.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/lib/private/server.php b/lib/private/server.php
index c9e593ec2ed..7696fc207fd 100644
--- a/lib/private/server.php
+++ b/lib/private/server.php
@@ -124,6 +124,9 @@ class Server extends SimpleContainer implements IServerContainer {
$this->registerService('AllConfig', function($c) {
return new \OC\AllConfig();
});
+ $this->registerService('AppConfig', function ($c) {
+ return new \OC\AppConfig(\OC_DB::getConnection());
+ });
$this->registerService('L10NFactory', function($c) {
return new \OC\L10N\Factory();
});
@@ -148,6 +151,13 @@ class Server extends SimpleContainer implements IServerContainer {
$this->registerService('AvatarManager', function($c) {
return new AvatarManager();
});
+ $this->registerService('JobList', function ($c) {
+ /**
+ * @var Server $c
+ */
+ $config = $c->getConfig();
+ return new \OC\BackgroundJob\JobList($c->getDatabaseConnection(), $config);
+ });
}
/**
@@ -270,6 +280,15 @@ class Server extends SimpleContainer implements IServerContainer {
}
/**
+ * Returns the app config manager
+ *
+ * @return \OCP\IAppConfig
+ */
+ function getAppConfig(){
+ return $this->query('AppConfig');
+ }
+
+ /**
* get an L10N instance
* @param $app string appid
* @return \OC_L10N
@@ -336,4 +355,13 @@ class Server extends SimpleContainer implements IServerContainer {
function getActivityManager() {
return $this->query('ActivityManager');
}
+
+ /**
+ * Returns an job list for controlling background jobs
+ *
+ * @return \OCP\BackgroundJob\IJobList
+ */
+ function getJobList(){
+ return $this->query('JobList');
+ }
}