application.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * @author Victor Dubiniuk
  4. * @copyright 2014 Victor Dubiniuk victor.dubiniuk@gmail.com
  5. *
  6. * This file is licensed under the Affero General Public License version 3 or
  7. * later.
  8. * See the COPYING-README file.
  9. */
  10. namespace OC\Core\LostPassword;
  11. use \OCP\AppFramework\App;
  12. use OC\Core\LostPassword\Controller\LostController;
  13. class Application extends App {
  14. public function __construct(array $urlParams=array()){
  15. parent::__construct('core', $urlParams);
  16. $container = $this->getContainer();
  17. /**
  18. * Controllers
  19. */
  20. $container->registerService('LostController', function($c) {
  21. return new LostController(
  22. $c->query('AppName'),
  23. $c->query('Request'),
  24. $c->query('ServerContainer')->getURLGenerator(),
  25. $c->query('ServerContainer')->getUserManager(),
  26. new \OC_Defaults(),
  27. $c->query('ServerContainer')->getL10N('core'),
  28. $c->query('ServerContainer')->getConfig(),
  29. $c->query('ServerContainer')->getUserSession(),
  30. \OCP\Util::getDefaultEmailAddress('lostpassword-noreply'),
  31. \OC_App::isEnabled('files_encryption')
  32. );
  33. });
  34. }
  35. }