2015-08-11 13:45:07 -04:00
|
|
|
<?php
|
|
|
|
|
/**
|
2024-06-06 03:55:47 -04:00
|
|
|
* SPDX-FileCopyrightText: 2019-2024 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
2015-08-11 13:45:07 -04:00
|
|
|
*/
|
|
|
|
|
namespace OCA\Files_External\Lib;
|
|
|
|
|
|
2019-11-22 14:52:10 -05:00
|
|
|
use OCA\Files_External\Service\BackendService;
|
2015-08-11 13:45:07 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Trait to implement priority mechanics for a configuration class
|
|
|
|
|
*/
|
|
|
|
|
trait PriorityTrait {
|
|
|
|
|
|
|
|
|
|
/** @var int initial priority */
|
|
|
|
|
protected $priority = BackendService::PRIORITY_DEFAULT;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return int
|
|
|
|
|
*/
|
|
|
|
|
public function getPriority() {
|
|
|
|
|
return $this->priority;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param int $priority
|
|
|
|
|
* @return self
|
|
|
|
|
*/
|
|
|
|
|
public function setPriority($priority) {
|
|
|
|
|
$this->priority = $priority;
|
|
|
|
|
return $this;
|
|
|
|
|
}
|
|
|
|
|
}
|