Jyxo\Mail\Email::setPriority PHP Method

setPriority() public method

Sets message priority.
public setPriority ( integer $priority ) : self
$priority integer Priority
return self
    public function setPriority(int $priority) : self
    {
        static $priorities = [self::PRIORITY_HIGHEST => true, self::PRIORITY_HIGH => true, self::PRIORITY_NORMAL => true, self::PRIORITY_LOW => true, self::PRIORITY_LOWEST => true];
        if (!isset($priorities[$priority])) {
            throw new \InvalidArgumentException(sprintf('Unknown priority %s', $priority));
        }
        $this->priority = (int) $priority;
        return $this;
    }