@param $priority

@throws UrlItemException

@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;
    }
693131
public function addPath($path, $priority = null)
    {
        if ($priority === null) {
            $priority = 0;
        }

        $this->insert($path, $priority);
        return $this;
    }
566438
public function priorityIn(array $values)
    {
        foreach ($values as $index => $value) {
            $values[$index] = (int) $value;
        }
        $this->add(new Criterium(self::CRITERIUM_PRIORITY_IN, $values));

        return $this;
    }
133704
public function add(callable $filter, $priority = null)
    {
        $this->filters->insert($filter, $priority);

        return $this;
    }
65603
function attach(iLoader $loader, $priority = 0)
    {
        $this->_t_loader_aggregate_getQueue()->insert($loader, $priority);

        $loaderClass = get_class($loader);
        $loaderClass = $this->_normalizeLoaderName($loaderClass);
        $this->_t_loader_aggregate_Names[$loaderClass] = $loader;

        return $this;
    }
304996
public function priority($level = 3)
    {
        $this->callbacks[] = function ($message) use ($level) {
            $message->setPriority($level);
        };

        return $this;
    }
783107
private function addFilterReq($f, $priority = FilterChain::DEFAULT_PRIORITY) {
		$this->_filtersReq->attach($f, $priority);
	}
749258
public function setLevelPriority($level, $priority)
    {
        $level = strtoupper($level);
        $this->config["levelsPriorities"][$level] = $priority;
    }
1239601
public function insert($data, $priority = 1)
        {
            $priority = (int) $priority;
            $this->items[] = array(
                'data'     => $data,
                'priority' => $priority,
            );
            $this->getQueue()->insert($data, $priority);

            return $this;
        }
1041049
public function insert($value, $priority)
    {
        if (! is_int($priority)) {
            throw new Exception\InvalidArgumentException('The priority must be an integer');
        }
        $this->values[$priority][] = $value;
        if (! isset($this->priorities[$priority])) {
            $this->priorities[$priority] = $priority;
            $this->maxPriority           = max($priority, $this->maxPriority);
        }
        ++$this->count;
    }
274439
public function bind(array $array = [], $priority = self::NORMAL)
    {
        foreach ($array as $item) {
            $this->insert($item, $priority);
        }

        return $this;
    }
674531
public function insert($data, $priority = 0)
    {
        $this->data[] = [
            'data'     => $data,
            'priority' => $priority,
        ];

        $priority = array($priority, $this->max--);
        $this->getSplQueue()->insert($data, $priority);
        return $this;
    }
439039
public function addMenuFilter(
        MenuFilterInterface $menuFilter,
        array $menus,
        $stage,
        $priority
    ) {
        $this->addElement(
            $menuFilter,
            $menus,
            $stage,
            $priority
        );

        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;
    }
239491
public function addMiddleware(MiddlewareInterface $middleware, $priority = 10)
    {
        $this->stack = $this->stack->withMiddleware($middleware, $priority);
        return $this;
    }
19027
public function setPriority($priority)
    {
        if (!OptionsPriorities::isValid($priority)) {
            throw new InvalidOptionsException('priority is not valid, please refer to the documentation or use the constants of the class "OptionsPriorities"');
        }
        $this->priority = $priority;

        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;
    }