public function get($handlerServiceId)
    {
        $handler = $this->container->get($handlerServiceId);

        if (!$handler instanceof CommandHandlerInterface) {
            throw new \InvalidArgumentException('Handler must be instance if ' . CommandHandlerInterface::class);
        }

        return $handler;
    }
public function get($handlerServiceId)
    {
        $handler = $this->container->get($handlerServiceId);

        if (!$handler instanceof CommandHandlerInterface) {
            throw new \InvalidArgumentException('Handler must be instance if ' . CommandHandlerInterface::class);
        }

        return $handler;
    }
public function get ( $ handlerServiceId ) { $ handler = $ this -> container -> get ( $ handlerServiceId ) ; if ( ! $ handler instanceof CommandHandlerInterface ) { throw new \ InvalidArgumentException ( 'Handler must be instance if ' . CommandHandlerInterface :: class ) ; } return $ handler ; }
Get command handler
@param string $handlerServiceId
@return CommandHandlerInterface
Get command handler