PreviewProviderRegistration.php 663 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
  5. * SPDX-License-Identifier: AGPL-3.0-or-later
  6. */
  7. namespace OC\AppFramework\Bootstrap;
  8. /**
  9. * @psalm-immutable
  10. * @template-extends ServiceRegistration<\OCP\Preview\IProviderV2>
  11. */
  12. class PreviewProviderRegistration extends ServiceRegistration {
  13. /** @var string */
  14. private $mimeTypeRegex;
  15. public function __construct(string $appId,
  16. string $service,
  17. string $mimeTypeRegex) {
  18. parent::__construct($appId, $service);
  19. $this->mimeTypeRegex = $mimeTypeRegex;
  20. }
  21. public function getMimeTypeRegex(): string {
  22. return $this->mimeTypeRegex;
  23. }
  24. }