Application.php 898 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2020 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OCA\ContactsInteraction\AppInfo;
  8. use OCA\ContactsInteraction\Listeners\ContactInteractionListener;
  9. use OCP\AppFramework\App;
  10. use OCP\AppFramework\Bootstrap\IBootContext;
  11. use OCP\AppFramework\Bootstrap\IBootstrap;
  12. use OCP\AppFramework\Bootstrap\IRegistrationContext;
  13. use OCP\Contacts\Events\ContactInteractedWithEvent;
  14. class Application extends App implements IBootstrap {
  15. public const APP_ID = 'contactsinteraction';
  16. public function __construct() {
  17. parent::__construct(self::APP_ID);
  18. }
  19. public function register(IRegistrationContext $context): void {
  20. $context->registerEventListener(ContactInteractedWithEvent::class, ContactInteractionListener::class);
  21. }
  22. public function boot(IBootContext $context): void {
  23. }
  24. }