/** * Set the priority of a command handler * * @param CommandHandlerInterface $handler A command handler * @param integer $priority The command priority * @return CommandChain */ public function setHandlerPriority(CommandHandlerInterface $handler, $priority) { $this->__queue->setPriority($handler, $priority); return $this; }
/** * Set the priority of a command * * @param CommandInterface $command * @param integer $priority * @return CommandChain * @throws \InvalidArgumentException if the object doesn't implement CommandInterface */ public function setPriority(ObjectHandlable $command, $priority) { if (!$command instanceof CommandInterface) { throw new \InvalidArgumentException('Command needs to implement CommandInterface'); } return parent::setPriority($command, $priority); }