PriorityTrait.php 690 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-FileCopyrightText: 2016 ownCloud, Inc.
  5. * SPDX-License-Identifier: AGPL-3.0-only
  6. */
  7. namespace OCA\Files_External\Lib;
  8. use OCA\Files_External\Service\BackendService;
  9. /**
  10. * Trait to implement priority mechanics for a configuration class
  11. */
  12. trait PriorityTrait {
  13. /** @var int initial priority */
  14. protected $priority = BackendService::PRIORITY_DEFAULT;
  15. /**
  16. * @return int
  17. */
  18. public function getPriority() {
  19. return $this->priority;
  20. }
  21. /**
  22. * @param int $priority
  23. * @return self
  24. */
  25. public function setPriority($priority) {
  26. $this->priority = $priority;
  27. return $this;
  28. }
  29. }