summaryrefslogtreecommitdiffstats
path: root/core/application.php
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2014-08-22 18:16:55 +0200
committerJörn Friedrich Dreyer <jfd@butonic.de>2014-08-25 11:50:19 +0200
commitf33312f76773a46acf084dd93830c739e44e9962 (patch)
tree4caa766b1d11ac1087b81f2d648f59f92194c1a1 /core/application.php
parent6202ef3258c7db707f32c0bcaa17552b92fa15eb (diff)
downloadnextcloud-server-f33312f76773a46acf084dd93830c739e44e9962.tar.gz
nextcloud-server-f33312f76773a46acf084dd93830c739e44e9962.zip
Use AppFramework instead of custom controller
Diffstat (limited to 'core/application.php')
-rw-r--r--core/application.php53
1 files changed, 53 insertions, 0 deletions
diff --git a/core/application.php b/core/application.php
new file mode 100644
index 00000000000..33801847758
--- /dev/null
+++ b/core/application.php
@@ -0,0 +1,53 @@
+<?php
+/**
+ * @author Victor Dubiniuk
+ * @copyright 2014 Victor Dubiniuk victor.dubiniuk@gmail.com
+ *
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+namespace OC\Core;
+
+use \OCP\AppFramework\App;
+use OC\Core\LostPassword\Controller\LostController;
+use OC\Core\User\UserController;
+
+class Application extends App {
+
+
+ public function __construct(array $urlParams=array()){
+ parent::__construct('core', $urlParams);
+
+ $container = $this->getContainer();
+
+ /**
+ * Controllers
+ */
+ $container->registerService('LostController', function($c) {
+ return new LostController(
+ $c->query('AppName'),
+ $c->query('Request'),
+ $c->query('ServerContainer')->getURLGenerator(),
+ $c->query('ServerContainer')->getUserManager(),
+ new \OC_Defaults(),
+ $c->query('ServerContainer')->getL10N('core'),
+ $c->query('ServerContainer')->getConfig(),
+ $c->query('ServerContainer')->getUserSession(),
+ \OCP\Util::getDefaultEmailAddress('lostpassword-noreply'),
+ \OC_App::isEnabled('files_encryption')
+ );
+ });
+ $container->registerService('UserController', function($c) {
+ return new UserController(
+ $c->query('AppName'),
+ $c->query('Request'),
+ $c->query('ServerContainer')->getUserManager(),
+ new \OC_Defaults()
+ );
+ });
+ }
+
+
+}