Set the priority of an object in the queue

@param   AnObjectHandlable  $object
@param   integer           $priority
@return  AnCommandChain
@throws  InvalidArgumentException if the object doesn't implement AnObjectHandlable
15829
public function setPriority(AnObjectHandlable $object, $priority)
    {
        if ($handle = $object->getHandle()) {
            if ($this->_priority_list->offsetExists($handle)) {
                $this->_priority_list->offsetSet($handle, $priority);
                $this->_priority_list->asort();
            }
        }

        return $this;
    }
486075
public function setHandlerPriority(CommandHandlerInterface $handler, $priority)
    {
        $this->__queue->setPriority($handler, $priority);
        return $this;
    }
15792
public function setPriority($priority=1)
    {

        $node = $this->getPriority(false);
        if(!$node){
            $node = $this->createElement('priority');
            $this->doc->appendChild($node);
        }
        $node->nodeValue = htmlspecialchars($priority);

    }
1115149
public function offsetUnset($object)
    {
        if (!$object instanceof KObjectHandlable) {
            throw new InvalidArgumentException('Object needs to implement KObjectHandlable');
        }

        unset($this->_data[$object->getHandle()]);
        return $this;
    }
480651
public static function reset($object)
	{
		if (!($object instanceof CodeGeneratorRequest)) {
			throw new \InvalidArgumentException('You have to pass object of class Google\Protobuf\Compiler\CodeGeneratorRequest.');
		}
		$object->fileToGenerate = NULL;
		$object->parameter = NULL;
		$object->protoFile = NULL;
	}
480904
public function setInstance($object, $abstract = null)
    {
        if (!is_object($object)) {
            throw new \InvalidArgumentException('$object must be an object');
        }
        if ($abstract === null) {
            //If $abstract is not specified, use $objects class
            $abstract = get_class($object);
        } elseif ($abstract[0] === '\\') {
            //Strip all leading backslashes
            $abstract = substr($abstract, 1);
        }
        $concrete = $this->findMostConcreteDefinition($abstract);
        if (isset($this->objects[$concrete])) {
            //If this class already has an instance, we'll return the old object
            $old = $this->objects[$concrete];
        } else {
            $old = false;
        }
        //Store the object
        $this->objects[$concrete] = $object;

        return $old;
    }
807652
public function offsetSet($offset, $object)
    {
        if (!$object instanceof ObjectHandlable) {
            throw new \InvalidArgumentException('Object needs to implement ObjectHandlable');
        }

        $this->__data[$object->getHandle()] = $object;
        return $this;
    }
380168
public function setObject( $object, $throwExceptionOnFailure = true )
    {

        // tasks only work on objects
        if( !is_object($object) ) {
            throw new BadTaskException("A task must be object");
            return false;
        }

        $error = null;

        if( $isCompatible = static::isCompatible( $object, $error ) ) {
            $this->object = $object;
            return true;
        }

        if( $throwExceptionOnFailure ) {
            throw new BadTaskException("{$error}");
        }
        return false;

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

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

        return $this;
    }
1311267
public function setRepositoryObject($object = null)
    {
        if (null !== $object && !$object instanceof \BaseObject) {
            throw new InvalidArgumentTypeException ('PropelRepository accepts only objects derived from propel \BaseObject');
        }

        $this->modelObject = $object;

        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;
    }
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;
    }
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;
    }
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;
    }
535942
public function offsetGet($object)
    {
        if (!$object instanceof AnObjectHandlable) {
            throw new InvalidArgumentException('Object needs to implement AnObjectHandlable');
        }

        return $this->_object_set->offsetGet($object->getHandle());
    }
683879
public function addHandler(HandlerInterface $handler, $priority = 0)
    {
        if (filter_var($priority, FILTER_VALIDATE_INT) === false) {
            throw new InvalidArgumentException("Argument 'priority' should be an integer, got '$priority'");
        }

        if ($this->handlerAlreadyRegistered($handler)) {
            return;
        }

        $this->handlers[$priority][] = $handler;
    }
695447
public function set($key, $object) {
		
		if (! is_object($object)) {
			throw new \InvalidArgumentException("Registry only accepts objects, given: ".gettype($object));
		}
		
		$this->_data[$key] = $object;
		
		return $this;
	}