Set/Get priority

@deprecated Since CakePHP 3.4.0-RC4 in core as setPriority()/getPriority()

@param int|null $priority 1 (highest) to 5 (lowest)
@return int|$this
337321
public function priority($priority = null) {
		if ($priority === null) {
			return $this->_priority;
		}
		$this->_priority = $priority;
		return $this;
	}
538948
function setPriority( $value, $params=FALSE  ) {
    $this->priority['value']  = $value;
    $this->priority['params'] = $this->_setParams( $params );
  }
77948
public function setSeverity($severity)
    {
        if (in_array($severity, ['error', 'warning', 'info', null], true)) {
            $this->severity = $severity;
        } else {
            throw new InvalidArgumentException('The severity must be either "error", "warning", or "info".');
        }

        return $this;
    }
151458
protected function getIndexingPriority()
    {
        $priority = 0;

        if (!empty($this->indexingConfiguration['indexingPriority'])) {
            $priority = (int)$this->indexingConfiguration['indexingPriority'];
        }

        return $priority;
    }
749258
public function setLevelPriority($level, $priority)
    {
        $level = strtoupper($level);
        $this->config["levelsPriorities"][$level] = $priority;
    }
361840
function getPriority()
    {
        $attributes = $this->parser->attributes($this->element);

        if (array_key_exists('priority', $attributes)) {
            return intval($attributes['priority']);
        }

        return null;
    }
1258193
public function enqueue($payload, $priority = 0)
    {
        $this->collection
            ->createDocument(array(
                'payload'   => $payload,
                'priority'  => (int) $priority,
                'datetime'  => new \MongoDate,
            ))
            ->save();
        
        return $this;
    }
1005595
private function sort_priority($a, $b) {
        $func_a = $this->functions[$a];
        $func_b = $this->functions[$b];

        if (!isset($func_a["priority"])) {
            $func_a["priority"] = 0;
        }
        if (!isset($func_b["priority"])) {
            $func_b["priority"] = 0;
        }
        if ($func_a["priority"] == $func_b["priority"]) {
            return 0;
        }
        return ($func_a["priority"] > $func_b["priority"]) ? -1 : 1;
    }
788803
public final synchronized void setPriority(byte priority) {
		if (this.priority == priority) return;
		if (status == STATUS_STARTED_READY) {
			if (manager.remove(this)) {
				this.priority = priority;
				while (manager.getTransferTarget() != null)
					manager = manager.getTransferTarget();
				manager.addReady(this);
				return;
			}
		}
		this.priority = priority;
	}
513355
public function prettyPrintPriority($priority)
    {
        $map = [
            MessagePriority::VERY_LOW => 'very low',
            MessagePriority::LOW => 'low',
            MessagePriority::NORMAL => 'normal',
            MessagePriority::HIGH => 'high',
            MessagePriority::VERY_HIGH => 'very high',
        ];

        return isset($map[$priority]) ? $map[$priority] : $priority;
    }
1361539
protected function _setOrder()
    {
        $order = $this->_sql->getOrder();
        if (!(is_null($order) || empty($order))) {
            $this->_statement .= " ORDER BY {$order}";
        }
        return $this;
    }
16553
public function setLevel($level)
    {
        if (!array_key_exists($level, self::LEVEL_PRIORITIES)) {
            throw new Exception(self::ERR_INVALID_LEVEL);
        }

        $lowestPriority = self::LEVEL_PRIORITIES[$level];
        $accepted = [];

        foreach (self::LEVEL_PRIORITIES as $level => $priority) {
            if ($priority > $lowestPriority) {
                continue;
            }

            $accepted[] = $level;
        }

        $this->acceptedLevels = $accepted;
    }
655507
public function setPriority($priority)
	{
		if (is_string($priority))
		{
			switch (strtolower($priority))
			{
				case 'high':
					$priority = 1;
					break;

				case 'normal':
					$priority = 3;
					break;

				case 'low':
					$priority = 5;
					break;

				default:
					$priority = 3;
					break;
			}
		}
		return parent::setPriority($priority);
	}
660903
def setPriority(self, queue, priority):
        '''
        
        '''
        q = self.queueindex[queue]
        self.queues[q[0]].removeSubQueue(q[1])
        newPriority = self.queues.setdefault(priority, CBQueue.MultiQueue(self, priority))
        q[0] = priority
        newPriority.addSubQueue(q[1])
696068
protected function createPriorityQueue()
    {
        $paths = $this->renderer->getPaths();

        if (!($paths instanceof PriorityQueue)) {
            $paths = new PriorityQueue($paths);

            $this->renderer->setPaths($paths);
        }

        return $this;
    }
1009451
public function setPriorityString($priority)
    {
        $priority = \array_search(\strtolower($priority), TicketMessageInterface::PRIORITIES);

        if ($priority > 0) {
            $this->setPriority($priority);
        }

        return $this;
    }
1086662
public function getPriorities()
	{
		// Fetch priorities when the method is called for the first time.
		if ( $this->priorities === null ) {
			$priorities = array();
			$result = $this->api(self::REQUEST_GET, '/rest/api/2/priority', array(), true);

			/* set hash key as custom field id */
			foreach ( $result as $priority ) {
				$priorities[$priority['id']] = $priority;
			}

			$this->priorities = $priorities;
		}

		return $this->priorities;
	}