public function __construct (array $urlParams=array()) { parent::__construct('ownnote', $urlParams); $container = $this->getContainer(); /** * Controllers */ $container->registerService('PageController', function(IContainer $c) { return new PageController( $c->query('AppName'), $c->query('Request'), $c->query('UserId') ); }); $container->registerService('OwnnoteApiController', function($c){ return new OwnnoteApiController( $c->query('AppName'), $c->query('Request') ); }); /** * Core */ $container->registerService('UserId', function(IContainer $c) { return \OCP\User::getUser(); }); }
public function __construct(array $urlParams = array()) { parent::__construct('documents', $urlParams); $container = $this->getContainer(); /** * Controllers */ $container->registerService('UserController', function ($c) { return new UserController($c->query('AppName'), $c->query('Request')); }); $container->registerService('SessionController', function ($c) { return new SessionController($c->query('AppName'), $c->query('Request'), $c->query('Logger'), $c->query('UserId')); }); $container->registerService('DocumentController', function ($c) { return new DocumentController($c->query('AppName'), $c->query('Request'), $c->query('CoreConfig'), $c->query('L10N'), $c->query('UserId')); }); $container->registerService('SettingsController', function ($c) { return new SettingsController($c->query('AppName'), $c->query('Request'), $c->query('CoreConfig'), $c->query('Logger'), $c->query('L10N'), $c->query('UserId')); }); /** * Core */ $container->registerService('Logger', function ($c) { return $c->query('ServerContainer')->getLogger(); }); $container->registerService('CoreConfig', function ($c) { return $c->query('ServerContainer')->getConfig(); }); $container->registerService('L10N', function ($c) { return $c->query('ServerContainer')->getL10N($c->query('AppName')); }); $container->registerService('UserId', function () { return \OCP\User::getUser(); }); }
public function __construct(array $urlParams = array()) { parent::__construct('weather', $urlParams); $container = $this->getContainer(); /** * Core */ $container->registerService('UserId', function (IContainer $c) { return \OCP\User::getUser(); }); /** * Database Layer */ $container->registerService('CityMapper', function (IContainer $c) { return new CityMapper($c->query('ServerContainer')->getDb()); }); $container->registerService('SettingsMapper', function (IContainer $c) { return new SettingsMapper($c->query('ServerContainer')->getDb()); }); /** * Controllers */ $container->registerService('CityController', function (IContainer $c) { return new CityController($c->query('AppName'), $c->query('Request'), $c->query('UserId'), $c->query('CityMapper'), $c->query('SettingsMapper')); }); $container->registerService('SettingsController', function (IContainer $c) { return new SettingsController($c->query('AppName'), $c->query('Request'), $c->query('UserId'), $c->query('SettingsMapper'), $c->query('CityMapper')); }); $container->registerService('WeatherController', function (IContainer $c) { return new WeatherController($c->query('AppName'), $c->query('Request'), $c->query('UserId'), $c->query('CityMapper'), $c->query('SettingsMapper')); }); }
public function __construct(array $urlParams = array()) { parent::__construct('bookmarks', $urlParams); $container = $this->getContainer(); /** * Controllers * @param OC\AppFramework\Utility\SimpleContainer $c The Container instance * that handles the request */ $container->registerService('WebViewController', function ($c) { return new WebViewController($c->query('AppName'), $c->query('Request'), $c->query('UserId'), $c->query('ServerContainer')->getURLGenerator(), $c->query('ServerContainer')->getDb()); }); $container->registerService('BookmarkController', function ($c) { return new BookmarkController($c->query('AppName'), $c->query('Request'), $c->query('UserId'), $c->query('ServerContainer')->getDb()); }); $container->registerService('TagsController', function ($c) { return new TagsController($c->query('AppName'), $c->query('Request'), $c->query('UserId'), $c->query('ServerContainer')->getDb()); }); $container->registerService('PublicController', function ($c) { return new PublicController($c->query('AppName'), $c->query('Request'), $c->query('ServerContainer')->getDb(), $c->query('ServerContainer')->getUserManager()); }); /** * Core */ $container->registerService('UserId', function () { return \OCP\User::getUser(); }); }
public function __construct(array $urlParams = array()) { parent::__construct('tasks', $urlParams); $container = $this->getContainer(); /** * Controllers */ $container->registerService('PageController', function ($c) { return new PageController($c->query('AppName'), $c->query('Request'), $c->query('UserId')); }); $container->registerService('CollectionsController', function ($c) { return new CollectionsController($c->query('AppName'), $c->query('Request'), $c->query('UserId'), $c->query('L10N'), $c->query('Settings')); }); $container->registerService('ListsController', function ($c) { return new ListsController($c->query('AppName'), $c->query('Request'), $c->query('UserId')); }); $container->registerService('SettingsController', function ($c) { return new SettingsController($c->query('AppName'), $c->query('Request'), $c->query('UserId'), $c->query('Settings')); }); $container->registerService('TasksController', function ($c) { return new TasksController($c->query('AppName'), $c->query('Request'), $c->query('UserId')); }); /** * Core */ $container->registerService('UserId', function ($c) { return \OCP\User::getUser(); }); $container->registerService('L10N', function ($c) { return $c->query('ServerContainer')->getL10N($c->query('AppName')); }); $container->registerService('Settings', function ($c) { return $c->query('ServerContainer')->getConfig(); }); }
public function __construct(array $urlParams = array()) { parent::__construct('user_deletion_request', $urlParams); $container = $this->getContainer(); /** * Controllers */ $container->registerService('UserHooks', function ($c) { return new UserHooks($c->query('UserManager'), $c->query('GroupManager'), $c->query('Config')); }); /** * Service */ $container->registerService('MailService', function ($c) { return new MailService($c->query('AppName'), $c->query('L10N'), $c->query('Config'), $c->query('UserManager'), $c->query('GroupManager')); }); /** * Core */ $container->registerService('Config', function ($c) { return $c->query('ServerContainer')->getConfig(); }); $container->registerService('L10N', function ($c) { return $c->query('ServerContainer')->getL10N($c->query('AppName')); }); $container->registerService('Logger', function ($c) { return $c->query('ServerContainer')->getLogger(); }); $container->registerService('UserManager', function ($c) { return $c->query('ServerContainer')->getUserManager(); }); $container->registerService('GroupManager', function ($c) { return $c->query('ServerContainer')->getGroupManager(); }); }
public function __construct(array $urlParams = array()) { parent::__construct('files_mv', $urlParams); $container = $this->getContainer(); $container->registerService('UserFolder', function (IContainer $c) { return $c->query('ServerContainer')->getUserFolder(); }); $container->registerService('ActivityApplication', function ($c) { return new \OCA\Activity\AppInfo\Application(); }); $container->registerService('Hooks', function (IContainer $c) { /** @var \OC\Server $server */ $server = $c->query('ServerContainer'); return new Hook($server->getActivityManager(), $c->query('ActivityApplication')->getContainer()->query('ActivityData'), $c->query('ActivityApplication')->getContainer()->query('UserSettings'), $server->getGroupManager(), new View(''), $server->getDatabaseConnection(), $c->query('CurrentUID')); }); $container->registerService('FilesHook', function ($c) { return new FilesHook($c->query('ServerContainer')->getRootFolder(), $c->query('Hooks')); }); $container->registerService('CurrentUID', function (IContainer $c) { /** @var \OC\Server $server */ $server = $c->query('ServerContainer'); $user = $server->getUserSession()->getUser(); return $user ? $user->getUID() : ''; }); }
public function __construct($urlParams = []) { parent::__construct('fuel', $urlParams); $container = $this->getContainer(); /** * Inject 'UserFolder' parameter */ $userFolder = $container->query('ServerContainer')->getUserFolder(); $container->registerParameter('UserFolder', $userFolder); /** * Inject L10n */ $L10n = $container->getServer()->getL10N('fuel'); $container->registerParameter('L10n', $L10n); /** * Register which validator to inject */ $container->registerService(IValidator::class, function ($c) { return $c->query(Validator::class); }, false); /** * Middleware */ $container->registerAlias('VehicleValidationMiddleware', VehicleValidationMiddleware::class); $container->registerAlias("RecordValidatonMiddleware", RecordValidationMiddleware::class); $container->registerMiddleWare('VehicleValidationMiddleware'); $container->registerMiddleWare("RecordValidatonMiddleware"); }
public function __construct(array $urlParams = array()) { parent::__construct('maps', $urlParams); $container = $this->getContainer(); /** * Controllers */ $container->registerService('PageController', function ($c) { return new PageController($c->query('AppName'), $c->query('Request'), $c->query('UserId'), $c->query('CacheManager'), $c->query('LocationManager')); }); $container->registerService('LocationController', function ($c) { return new LocationController($c->query('AppName'), $c->query('Request'), $c->query('LocationManager'), $c->query('UserId')); }); $container->registerService('CacheManager', function ($c) { return new CacheManager($c->query('ServerContainer')->getDb()); }); $container->registerService('LocationManager', function ($c) { return new LocationManager($c->query('ServerContainer')->getDb()); }); /** * Core */ $container->registerService('UserId', function ($c) { return \OCP\User::getUser(); }); $container->registerService('Db', function () { return new Db(); }); }
public function __construct(array $urlParams = []) { parent::__construct('updater', $urlParams); $container = $this->getContainer(); /** * Controllers */ $container->registerService('UpdateController', function ($c) { return new UpdateController($c->query('AppName'), $c->query('Request'), $c->query('L10N')); }); $container->registerService('BackupController', function ($c) { return new BackupController($c->query('AppName'), $c->query('Request'), $c->query('Config'), $c->query('L10N')); }); $container->registerService('AdminController', function ($c) { return new AdminController($c->query('AppName'), $c->query('Request'), $c->query('Config'), $c->query('L10N')); }); $container->registerService('L10N', function ($c) { return $c->query('ServerContainer')->getL10N($c->query('AppName')); }); $container->registerService('Config', function ($c) { return new Config($c->query('ServerContainer')->getConfig()); }); $container->registerService('Channel', function ($c) { return new Channel($c->query('L10N')); }); //Startup if (\OC_Util::getEditionString() === '') { \OCP\App::registerAdmin('updater', 'admin'); $appPath = $container->query('Config')->getBackupBase(); if (!@file_exists($appPath)) { Helper::mkdir($appPath); } } }
public function __construct(array $urlParams = array()) { parent::__construct('exifview', $urlParams); $container = $this->getContainer(); // $container->registerService('RootView', function ($c) { // return \OC\files::getView(); // }); $container->registerService('PageController', function ($c) { return new PageController($c->query('AppName'), $c->query('UserId'), $c->query('Request'), $c->query('ServerContainer')->getUserFolder()); }); $container->registerService('GpsXML', function ($c) { return new GpsXML($c->query('AppName'), $c->query('UserId'), $c->query('ServerContainer')->getDbConnection()); }); $container->registerService('UserStorage', function ($c) { return $c->query('ServerContainer')->getUserFolder(); }); $container->registerService('JsonController', function ($c) { return new JsonController($c->query('AppName'), $c->query('UserId'), $c->query('Request'), $c->query('GpsXML')); }); // $container->registerService('TestService', function($c) { // return new TestService( // $c->query('ServerContainer')->getDbConnection() // ); // }); // $container->registerService('TestController', function($c){ // return new TestController( // $c->query('AppName'), // $c->query('UserId'), // $c->query('Request'), // $c->query('TestService') // ); // }); }
public function __construct(array $urlParams = array()) { parent::__construct('files_sharing', $urlParams); $container = $this->getContainer(); $server = $container->getServer(); /** * Controllers */ $container->registerService('ShareController', function (SimpleContainer $c) use($server) { return new ShareController($c->query('AppName'), $c->query('Request'), $c->query('UserSession'), $server->getAppConfig(), $server->getConfig(), $c->query('URLGenerator'), $c->query('UserManager'), $server->getLogger(), $server->getActivityManager()); }); $container->registerService('ExternalSharesController', function (SimpleContainer $c) { return new ExternalSharesController($c->query('AppName'), $c->query('Request'), $c->query('IsIncomingShareEnabled'), $c->query('ExternalManager'), $c->query('HttpClientService')); }); /** * Core class wrappers */ $container->registerService('UserSession', function (SimpleContainer $c) use($server) { return $server->getUserSession(); }); $container->registerService('URLGenerator', function (SimpleContainer $c) use($server) { return $server->getUrlGenerator(); }); $container->registerService('UserManager', function (SimpleContainer $c) use($server) { return $server->getUserManager(); }); $container->registerService('HttpClientService', function (SimpleContainer $c) use($server) { return $server->getHTTPClientService(); }); $container->registerService('IsIncomingShareEnabled', function (SimpleContainer $c) { return Helper::isIncomingServer2serverShareEnabled(); }); $container->registerService('ExternalManager', function (SimpleContainer $c) use($server) { $user = $server->getUserSession()->getUser(); $uid = $user ? $user->getUID() : null; return new \OCA\Files_Sharing\External\Manager($server->getDatabaseConnection(), \OC\Files\Filesystem::getMountManager(), \OC\Files\Filesystem::getLoader(), $server->getHTTPHelper(), $server->getNotificationManager(), $uid); }); /** * Middleware */ $container->registerService('SharingCheckMiddleware', function (SimpleContainer $c) use($server) { return new SharingCheckMiddleware($c->query('AppName'), $server->getConfig(), $server->getAppManager()); }); // Execute middlewares $container->registerMiddleware('SharingCheckMiddleware'); $container->registerService('MountProvider', function (IContainer $c) { /** @var \OCP\IServerContainer $server */ $server = $c->query('ServerContainer'); return new MountProvider($server->getConfig(), $c->query('PropagationManager')); }); $container->registerService('PropagationManager', function (IContainer $c) { /** @var \OCP\IServerContainer $server */ $server = $c->query('ServerContainer'); return new PropagationManager($server->getUserSession(), $server->getConfig()); }); /* * Register capabilities */ $container->registerCapability('OCA\\Files_Sharing\\Capabilities'); }
/** * Define your dependencies in here */ public function __construct(array $urlParams = array()) { parent::__construct('user_account_actions', $urlParams); $container = $this->getContainer(); /** * Controllers */ $container->registerService('UserHooks', function ($c) { return new UserHooks($c->query('ServerContainer')->getUserManager(), $c->query('MailAction'), $c->query('FileAction')); }); /** * Lib */ $container->registerService('MailAction', function ($c) { return new MailAction($c->query('AppName'), $c->query('L10N'), $c->query('Config')); }); $container->registerService('FileAction', function ($c) { return new FileAction($c->query('AppName'), $c->query('L10N'), $c->query('Config'), $c->query('Logger')); }); /** * Core */ $container->registerService('Config', function ($c) { return $c->query('ServerContainer')->getConfig(); }); $container->registerService('L10N', function ($c) { return $c->query('ServerContainer')->getL10N($c->query('AppName')); }); $container->registerService('Logger', function ($c) { return $c->query('ServerContainer')->getLogger(); }); }
public function __construct(array $urlParams = array()) { parent::__construct('files', $urlParams); $container = $this->getContainer(); $server = $container->getServer(); /** * Controllers */ $container->registerService('APIController', function (IContainer $c) use($server) { return new ApiController($c->query('AppName'), $c->query('Request'), $server->getUserSession(), $c->query('TagService'), $server->getPreviewManager(), $server->getShareManager(), $server->getConfig()); }); $container->registerService('ViewController', function (IContainer $c) use($server) { return new ViewController($c->query('AppName'), $c->query('Request'), $server->getURLGenerator(), $server->getNavigationManager(), $c->query('L10N'), $server->getConfig(), $server->getEventDispatcher(), $server->getUserSession(), $server->getAppManager(), $server->getRootFolder()); }); /** * Core */ $container->registerService('L10N', function (IContainer $c) { return $c->query('ServerContainer')->getL10N($c->query('AppName')); }); /** * Services */ $container->registerService('Tagger', function (IContainer $c) { return $c->query('ServerContainer')->getTagManager()->load('files'); }); $container->registerService('TagService', function (IContainer $c) { $homeFolder = $c->query('ServerContainer')->getUserFolder(); return new TagService($c->query('ServerContainer')->getUserSession(), $c->query('Tagger'), $homeFolder); }); /* * Register capabilities */ $container->registerCapability('OCA\\Files\\Capabilities'); }
/** * @param array $urlParams */ public function __construct(array $urlParams = array()) { parent::__construct('settings', $urlParams); $container = $this->getContainer(); /** * Controllers */ $container->registerService('MailSettingsController', function (SimpleContainer $c) { return new MailSettingsController($c->query('AppName'), $c->query('Request'), $c->query('L10N'), $c->query('Config'), $c->query('UserSession'), $c->query('Defaults'), $c->query('Mail'), $c->query('DefaultMailAddress')); }); /** * Core class wrappers */ $container->registerService('Config', function (SimpleContainer $c) { return $c->query('ServerContainer')->getConfig(); }); $container->registerService('L10N', function (SimpleContainer $c) { return $c->query('ServerContainer')->getL10N('settings'); }); $container->registerService('UserSession', function (SimpleContainer $c) { return $c->query('ServerContainer')->getUserSession(); }); $container->registerService('Mail', function (SimpleContainer $c) { return new \OC_Mail(); }); $container->registerService('Defaults', function (SimpleContainer $c) { return new \OC_Defaults(); }); $container->registerService('DefaultMailAddress', function (SimpleContainer $c) { return Util::getDefaultEmailAddress('no-reply'); }); }
public function __construct(array $urlParams = array()) { parent::__construct('files', $urlParams); $container = $this->getContainer(); /** * Controllers */ $container->registerService('APIController', function (IContainer $c) { return new ApiController($c->query('AppName'), $c->query('Request'), $c->query('TagService')); }); /** * Core */ $container->registerService('L10N', function (IContainer $c) { return $c->query('ServerContainer')->getL10N($c->query('AppName')); }); /** * Services */ $container->registerService('Tagger', function (IContainer $c) { return $c->query('ServerContainer')->getTagManager()->load('files'); }); $container->registerService('TagService', function (IContainer $c) { $homeFolder = $c->query('ServerContainer')->getUserFolder(); return new TagService($c->query('ServerContainer')->getUserSession(), $c->query('Tagger'), $homeFolder); }); /** * Controllers */ $container->registerService('APIController', function (IContainer $c) { return new ApiController($c->query('AppName'), $c->query('Request'), $c->query('TagService')); }); }
/** * Application constructor. * * @param array $urlParams */ public function __construct(array $urlParams = array()) { parent::__construct('dav', $urlParams); $container = $this->getContainer(); $container->registerService('ContactsManager', function ($c) { /** @var IAppContainer $c */ return new ContactsManager($c->query('CardDavBackend')); }); $container->registerService('HookManager', function ($c) { /** @var IAppContainer $c */ return new HookManager($c->getServer()->getUserManager(), $c->query('SyncService'), $c->query('CalDavBackend'), $c->query('CardDavBackend')); }); $container->registerService('SyncService', function ($c) { /** @var IAppContainer $c */ return new SyncService($c->query('CardDavBackend'), $c->getServer()->getUserManager(), $c->getServer()->getLogger()); }); $container->registerService('CardDavBackend', function ($c) { /** @var IAppContainer $c */ $db = $c->getServer()->getDatabaseConnection(); $dispatcher = $c->getServer()->getEventDispatcher(); $principal = new Principal($c->getServer()->getUserManager(), $c->getServer()->getGroupManager()); return new CardDavBackend($db, $principal, $dispatcher); }); $container->registerService('CalDavBackend', function ($c) { /** @var IAppContainer $c */ $db = $c->getServer()->getDatabaseConnection(); $principal = new Principal($c->getServer()->getUserManager(), $c->getServer()->getGroupManager()); return new CalDavBackend($db, $principal); }); $container->registerService('BirthdayService', function ($c) { /** @var IAppContainer $c */ $g = new GroupPrincipalBackend($c->getServer()->getGroupManager()); return new BirthdayService($c->query('CalDavBackend'), $c->query('CardDavBackend'), $g); }); }
/** * Application constructor. * * @param array $urlParams */ public function __construct(array $urlParams = array()) { parent::__construct('dav', $urlParams); $container = $this->getContainer(); $container->registerService('ContactsManager', function ($c) { /** @var IAppContainer $c */ return new ContactsManager($c->query('CardDavBackend')); }); $container->registerService('HookManager', function ($c) { /** @var IAppContainer $c */ return new HookManager($c->getServer()->getUserManager(), $c->query('SyncService')); }); $container->registerService('SyncService', function ($c) { /** @var IAppContainer $c */ return new SyncService($c->query('CardDavBackend'), $c->getServer()->getUserManager()); }); $container->registerService('CardDavBackend', function ($c) { /** @var IAppContainer $c */ $db = $c->getServer()->getDatabaseConnection(); $logger = $c->getServer()->getLogger(); $principal = new \OCA\DAV\Connector\Sabre\Principal($c->getServer()->getUserManager(), $c->getServer()->getGroupManager()); return new \OCA\DAV\CardDAV\CardDavBackend($db, $principal, $logger); }); $container->registerService('MigrateAddressbooks', function ($c) { /** @var IAppContainer $c */ $db = $c->getServer()->getDatabaseConnection(); return new MigrateAddressbooks(new AddressBookAdapter($db), $c->query('CardDavBackend')); }); }
/** * Define your dependencies in here */ public function __construct(array $urlParams = array()) { parent::__construct('user_files_restore', $urlParams); $container = $this->getContainer(); /** * Controllers */ $container->registerService('PageController', function ($c) { return new PageController($c->query('AppName'), $c->query('Request'), $c->query('L10N'), $c->query('RequestService'), $c->query('UserId')); }); $container->registerService('RequestController', function ($c) { return new RequestController($c->query('AppName'), $c->query('Request'), $c->query('L10N'), $c->query('RequestMapper'), $c->query('UserId')); }); /** * Services */ $container->registerService('RequestService', function ($c) { return new RequestService($c->query('RequestMapper'), $c->query('UserId'), $c->query('L10N')); }); /** * Database Layer */ $container->registerService('RequestMapper', function ($c) { return new RequestMapper($c->query('ServerContainer')->getDb(), $c->query('L10N')); }); /** * Core */ $container->registerService('UserId', function ($c) { return \OCP\User::getUser(); }); $container->registerService('L10N', function ($c) { return $c->query('ServerContainer')->getL10N($c->query('AppName')); }); }
/** * Creates an Application object and registers its related services, * user hooks, and settings */ public function __construct(array $urlParams = array()) { parent::__construct(self::APP_ID, $urlParams); $this->registerServices(); $this->registerHooks(); $this->registerSettings(); }
/** * @param array $urlParams */ public function __construct($urlParams = array()) { parent::__construct('encryption', $urlParams); $this->encryptionManager = \OC::$server->getEncryptionManager(); $this->config = \OC::$server->getConfig(); $this->registerServices(); }
/** * @param array $urlParams */ public function __construct(array $urlParams = array()) { parent::__construct('core', $urlParams); $container = $this->getContainer(); /** * Controllers */ $container->registerService('LostController', function (SimpleContainer $c) { return new LostController($c->query('AppName'), $c->query('Request'), $c->query('URLGenerator'), $c->query('UserManager'), $c->query('Defaults'), $c->query('L10N'), $c->query('Config'), $c->query('SecureRandom'), $c->query('DefaultEmailAddress'), $c->query('IsEncryptionEnabled'), $c->query('Mailer')); }); $container->registerService('UserController', function (SimpleContainer $c) { return new UserController($c->query('AppName'), $c->query('Request'), $c->query('UserManager'), $c->query('Defaults')); }); $container->registerService('AvatarController', function (SimpleContainer $c) { return new AvatarController($c->query('AppName'), $c->query('Request'), $c->query('AvatarManager'), $c->query('Cache'), $c->query('L10N'), $c->query('UserManager'), $c->query('UserSession'), $c->query('UserFolder')); }); /** * Core class wrappers */ $container->registerService('IsEncryptionEnabled', function (SimpleContainer $c) { return $c->query('ServerContainer')->getEncryptionManager()->isEnabled(); }); $container->registerService('URLGenerator', function (SimpleContainer $c) { return $c->query('ServerContainer')->getURLGenerator(); }); $container->registerService('UserManager', function (SimpleContainer $c) { return $c->query('ServerContainer')->getUserManager(); }); $container->registerService('Config', function (SimpleContainer $c) { return $c->query('ServerContainer')->getConfig(); }); $container->registerService('L10N', function (SimpleContainer $c) { return $c->query('ServerContainer')->getL10N('core'); }); $container->registerService('SecureRandom', function (SimpleContainer $c) { return $c->query('ServerContainer')->getSecureRandom(); }); $container->registerService('AvatarManager', function (SimpleContainer $c) { return $c->query('ServerContainer')->getAvatarManager(); }); $container->registerService('UserSession', function (SimpleContainer $c) { return $c->query('ServerContainer')->getUserSession(); }); $container->registerService('Cache', function (SimpleContainer $c) { return $c->query('ServerContainer')->getCache(); }); $container->registerService('UserFolder', function (SimpleContainer $c) { return $c->query('ServerContainer')->getUserFolder(); }); $container->registerService('Defaults', function () { return new \OC_Defaults(); }); $container->registerService('Mailer', function (SimpleContainer $c) { return $c->query('ServerContainer')->getMailer(); }); $container->registerService('DefaultEmailAddress', function () { return Util::getDefaultEmailAddress('lostpassword-noreply'); }); }
public function __construct(array $urlParams = []) { parent::__construct('ownbackup', $urlParams); $container = $this->getContainer(); $container->registerService('AdminController', function ($c) { return new AdminController($c->query('AppName'), $c->query('Request'), $c->query('BackupService')); }); }
public function __construct(array $urlParams = array()) { parent::__construct(APP_ID, $urlParams); $container = $this->getContainer(); /** * Controllers */ }
public function __construct($urlParams = []) { parent::__construct('sketch', $urlParams); $container = $this->getContainer(); $container->registerService('DataFolder', function ($c) { return $c->getServer()->getUserFolder(); }); }
public function __construct(array $urlParams = array()) { parent::__construct('files_external', $urlParams); $this->loadBackends(); $this->loadAuthMechanisms(); // app developers: do NOT depend on this! it will disappear with oC 9.0! \OC::$server->getEventDispatcher()->dispatch('OCA\\Files_External::loadAdditionalBackends'); }
public function __construct(array $urlParams = array()) { parent::__construct('updatenotification', $urlParams); $container = $this->getContainer(); $container->registerService('AdminController', function (IAppContainer $c) { return new AdminController($c->query('AppName'), $c->query('Request'), $c->getServer()->getJobList(), $c->getServer()->getSecureRandom(), $c->getServer()->getConfig(), new TimeFactory()); }); }
public function __construct($params) { parent::__construct('contacts', $params); $this->container = $this->getContainer(); $this->container->registerMiddleware(new HttpMiddleware($this->container)); $this->app = new App($this->container->query('API')->getUserId()); $this->registerServices(); }
public function __construct(array $urlParams = array()) { parent::__construct('files_versions', $urlParams); $container = $this->getContainer(); /* * Register capabilities */ $container->registerCapability('OCA\\Files_Versions\\Capabilities'); }
public function __construct(array $urlParams = array()) { parent::__construct('updatenotification', $urlParams); $container = $this->getContainer(); $container->registerService('AdminController', function (IAppContainer $c) { $updater = new \OC\Updater\VersionCheck(\OC::$server->getHTTPClientService(), \OC::$server->getConfig()); return new AdminController($c->query('AppName'), $c->query('Request'), $c->getServer()->getJobList(), $c->getServer()->getSecureRandom(), $c->getServer()->getConfig(), new TimeFactory(), $c->getServer()->getL10N($c->query('AppName')), new UpdateChecker($updater), $c->getServer()->getDateTimeFormatter()); }); }