summaryrefslogtreecommitdiffstats
path: root/core/lostpassword/application.php
blob: f39f8aee75ee4db59464b6bf6acada225f0ef242 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?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\LostPassword;

use \OCP\AppFramework\App;
use OC\Core\LostPassword\Controller\LostController;

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(),
				'\OC_User',
				new \OC_Defaults(),
				$c->query('ServerContainer')->getL10N('core'),
				\OCP\Util::getDefaultEmailAddress('lostpassword-noreply'),
				\OC_App::isEnabled('files_encryption')
			);
		});
	}
}