code/command/chain/chain.php
public function addHandler(CommandHandlerInterface $handler)
    {
        $this->__queue->enqueue($handler, $handler->getPriority());
        return $this;
    }
public function addHandler(CommandHandlerInterface $handler)
    {
        $this->__queue->enqueue($handler, $handler->getPriority());
        return $this;
    }
public function addHandler ( CommandHandlerInterface $ handler ) { $ this -> __queue -> enqueue ( $ handler , $ handler -> getPriority ( ) ) ; return $ this ; }
Attach a command handler to the chain

@param   CommandHandlerInterface  $handler  The command handler
@return CommandChain
Attach a command handler to the chain