Detaches of the upload strategy with the specific priority.

@param int $priority The priority

@throws \RuntimeException If try to detach during invoking

@return self
6417
public function detach($priority)
    {
        if ($this->started) {
            throw new RuntimeException('Unable during invoking.');
        }
        if (isset($this->queue[$priority])) {
            unset($this->queue[$priority]);
            $this->sortedQueue = null;
        }

        return $this;
    }
531243
public function priority($priority = null)
    {
        $headers = $this->headers();
        if (!func_num_args()) {
            return $headers['X-Priority'];
        }
        $headers['X-Priority'] = (string) $priority;
        return $this;
    }
659610
public function removeFrame($offset)
    {
        if (!isset($this->frames[$offset])) {
            throw new \InvalidArgumentException('Offset does not exist.');
        }

        unset($this->frames[$offset]);

        return $this;
    }
1289740
public function setPriority(int $priority): void
    {
        if ($priority < 0 || $priority > static::MAX_PRIORITY) {
            throw new \InvalidArgumentException('Priority must be an unsigned integer on the range [0-65535]');
        }

        $this->priority = $priority;
    }
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);
	}
771782
public function attach($eventType, $callable, $priority = 10)
    {
        if (!isset(self::$listener[$eventType])) {
            self::$listener[$eventType] = new SplPriorityQueue();
        }

        self::$listener[$eventType]->insert($callable, $priority);

        return $this;
    }
1077034
public function end(array $options = array())
    {
        if (null === $this->currentBundleOptions) {
            throw new \RuntimeException('end() is called without a start() call.');
        }

        $options = array_merge($this->currentBundleOptions, $options);

        $captured = ob_get_clean();

        if ($options['bypass']) {
            echo $captured;
        } else {
            $this->extractFiles($captured, $options['docroot']);
        }

        $this->currentBundleOptions = null;

        return $this;
    }
621514
public function release()
    {
        try {
            $this->lock->release();
        } catch (\Exception $ex) {
            throw new \RuntimeException(
                sprintf(
                    'Releasing the lock failed with the following message: %s',
                    $ex->getMessage()
                ),
                0,
                $ex
            );
        }
    }
509060
public function off(string $eventName, callable $handler = null, int $priority = null): self
    {
        if ($handler === null) {
            return $this->offAll($eventName);
        }

        $priority === null
            ? $this->offHandlerWithoutPriority($eventName, $handler)
            : $this->offHandlerWithPriority($eventName, $handler, $priority);

        if (empty($this->listeners[$eventName])) {
            unset($this->listeners[$eventName], $this->sorted[$eventName]);
        }

        return $this;
    }
1073788
public function setPriority($priority)
    {
        Argument::i()->test(1, 'string', 'number');

        switch ($priority) {
            case 'high':
                $this->priority = 9;
                break;

            case 'medium':
                $this->priority = 4;
                break;

            case 'low':
                $this->priority = 0;
                break;

            default:
                $this->priority = $priority;
                break;
        }

        return $this;
    }
879745
public function delete(string $path, callable $callback, int $priority = 0)
    {
        return $this->route('delete', $path, $callback, $priority);
    }
105040
public function setPriority($priority = null)
    {
        if (!$priority) {
            return $this;
        }

        if ($priority && is_numeric($priority) && $priority >= 0 && $priority <= 1) {
            $this->priority = number_format($priority, 1);
        } else {
            throw new \RuntimeException(
                sprintf(
                    'The value "%s" is not supported by the option priority, it must be a numeric between 0.0 and 1.0. See http://www.sitemaps.org/protocol.html#xmlTagDefinitions',
                    $priority
                )
            );
        }

        return $this;
    }
657330
public function reset()
    {
        $this->pathRegistered = false;

        if ($this->renderer instanceof PhpRenderer) {
            $this->renderer->reset();
        }

        $this->renderer->setPaths(new PriorityQueue());

        return $this;
    }
377446
protected function createQueue($priority)
    {
        if (!$this->queues[$priority]) {
            $key = $this->getIntChannels()[$priority];
            $this->queues[$priority] = msg_get_queue($key);
        }

        return $this->queues[$priority];
    }
693131
public function addPath($path, $priority = null)
    {
        if ($priority === null) {
            $priority = 0;
        }

        $this->insert($path, $priority);
        return $this;
    }
655102
public function setHandlerPriority(KCommandHandlerInterface $handler, $priority)
    {
        $this->__queue->setPriority($handler, $priority);
        return $this;
    }
168969
public function setPriority($priority)
    {
        self::writeFullTag(
            $priority,
            'priority',
            false,
            'priority',
            $this->validator,
            'validatePriority',
            $this->exception,
            'Provided priority is not a valid value.'
        );

        return $this;
    }