1
0

MiddlewareRegistration.php 612 B

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