You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

application.php 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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;
  11. use \OCP\AppFramework\App;
  12. use OC\Core\LostPassword\Controller\LostController;
  13. use OC\Core\User\UserController;
  14. class Application extends App {
  15. public function __construct(array $urlParams=array()){
  16. parent::__construct('core', $urlParams);
  17. $container = $this->getContainer();
  18. /**
  19. * Controllers
  20. */
  21. $container->registerService('LostController', function($c) {
  22. return new LostController(
  23. $c->query('AppName'),
  24. $c->query('Request'),
  25. $c->query('ServerContainer')->getURLGenerator(),
  26. $c->query('ServerContainer')->getUserManager(),
  27. new \OC_Defaults(),
  28. $c->query('ServerContainer')->getL10N('core'),
  29. $c->query('ServerContainer')->getConfig(),
  30. $c->query('ServerContainer')->getUserSession(),
  31. \OCP\Util::getDefaultEmailAddress('lostpassword-noreply'),
  32. \OC_App::isEnabled('files_encryption')
  33. );
  34. });
  35. $container->registerService('UserController', function($c) {
  36. return new UserController(
  37. $c->query('AppName'),
  38. $c->query('Request'),
  39. $c->query('ServerContainer')->getUserManager(),
  40. new \OC_Defaults()
  41. );
  42. });
  43. }
  44. }