diff options
author | Morris Jobke <hey@morrisjobke.de> | 2020-07-21 14:36:40 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2020-07-21 20:44:05 +0200 |
commit | 7870ca06637453f4e72dbd67edbfb3603d813196 (patch) | |
tree | 9f61927799c9baf39e336fa4299d4ac0fe4e34a1 /apps/lookup_server_connector | |
parent | 91e7f12088cb87ffef5660429ece404364167978 (diff) | |
download | nextcloud-server-7870ca06637453f4e72dbd67edbfb3603d813196.tar.gz nextcloud-server-7870ca06637453f4e72dbd67edbfb3603d813196.zip |
Use the proper IAppContainer and IServerContainer type hints to know which code runs with which container
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/lookup_server_connector')
-rw-r--r-- | apps/lookup_server_connector/lib/AppInfo/Application.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/lookup_server_connector/lib/AppInfo/Application.php b/apps/lookup_server_connector/lib/AppInfo/Application.php index df5ddcbab87..cc51dff5cf0 100644 --- a/apps/lookup_server_connector/lib/AppInfo/Application.php +++ b/apps/lookup_server_connector/lib/AppInfo/Application.php @@ -35,8 +35,8 @@ use OCP\AppFramework\Bootstrap\IBootContext; use OCP\AppFramework\Bootstrap\IBootstrap; use OCP\AppFramework\Bootstrap\IRegistrationContext; use OCP\EventDispatcher\IEventDispatcher; +use OCP\AppFramework\IAppContainer; use OCP\IUser; -use Psr\Container\ContainerInterface; use Symfony\Component\EventDispatcher\GenericEvent; class Application extends App implements IBootstrap { @@ -57,13 +57,13 @@ class Application extends App implements IBootstrap { * @todo move the OCP events and then move the registration to `register` */ private function registerEventListeners(IEventDispatcher $dispatcher, - ContainerInterface $container): void { - $dispatcher->addListener('OC\AccountManager::userUpdated', function (GenericEvent $event) use ($container) { + IAppContainer $appContainer): void { + $dispatcher->addListener('OC\AccountManager::userUpdated', function (GenericEvent $event) use ($appContainer) { /** @var IUser $user */ $user = $event->getSubject(); /** @var UpdateLookupServer $updateLookupServer */ - $updateLookupServer = $container->get(UpdateLookupServer::class); + $updateLookupServer = $appContainer->get(UpdateLookupServer::class); $updateLookupServer->userUpdated($user); }); } |