nextcloud/core/lostpassword/application.php

45 lines
1.1 KiB
PHP
Raw Normal View History

2014-05-28 21:13:07 +04:00
<?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 {
2014-06-06 18:36:10 +04:00
2014-05-28 21:13:07 +04:00
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'),
2014-06-03 02:24:27 +04:00
$c->query('Request'),
2014-05-28 21:13:07 +04:00
$c->query('ServerContainer')->getURLGenerator(),
2014-06-06 18:36:10 +04:00
$c->query('ServerContainer')->getUserManager(),
2014-05-28 21:13:07 +04:00
new \OC_Defaults(),
$c->query('ServerContainer')->getL10N('core'),
2014-06-06 18:36:10 +04:00
$c->query('ServerContainer')->getConfig(),
$c->query('ServerContainer')->getUserSession(),
2014-05-28 21:13:07 +04:00
\OCP\Util::getDefaultEmailAddress('lostpassword-noreply'),
\OC_App::isEnabled('files_encryption')
);
});
}
2014-06-06 18:36:10 +04:00
2014-05-28 21:13:07 +04:00
}