public function bindHandler($commandName, $handler)
    {
        // If the $handler given is an instance of CommandHandler, simply bind that
        if ($handler instanceof CommandHandler) {
            $this->handlers[$commandName] = $handler;
            return;
        }

        // If the handler given is callable, wrap it up in a CallableCommandHandler for executing later
        if (is_callable($handler)) {
            return $this->bindHandler($commandName, new CallableCommandHandler($handler));
        }

        // If the handler given is a string, wrap it up in a LazyLoadingCommandHandler for loading later
        if (is_string($handler)) {
            return $this->bindHandler($commandName, new LazyLoadingCommandHandler($handler, $this->container));
        }

        throw new \InvalidArgumentException('Could not push handler. Command Handlers should be an
            instance of Chief\CommandHandler, a callable, or a string representing a CommandHandler class');
    }
public function bindHandler($commandName, $handler)
    {
        // If the $handler given is an instance of CommandHandler, simply bind that
        if ($handler instanceof CommandHandler) {
            $this->handlers[$commandName] = $handler;
            return;
        }

        // If the handler given is callable, wrap it up in a CallableCommandHandler for executing later
        if (is_callable($handler)) {
            return $this->bindHandler($commandName, new CallableCommandHandler($handler));
        }

        // If the handler given is a string, wrap it up in a LazyLoadingCommandHandler for loading later
        if (is_string($handler)) {
            return $this->bindHandler($commandName, new LazyLoadingCommandHandler($handler, $this->container));
        }

        throw new \InvalidArgumentException('Could not push handler. Command Handlers should be an
            instance of Chief\CommandHandler, a callable, or a string representing a CommandHandler class');
    }
public function bindHandler ( $ commandName , $ handler ) { // If the $handler given is an instance of CommandHandler, simply bind that if ( $ handler instanceof CommandHandler ) { $ this -> handlers [ $ commandName ] = $ handler ; return ; } // If the handler given is callable, wrap it up in a CallableCommandHandler for executing later if ( is_callable ( $ handler ) ) { return $ this -> bindHandler ( $ commandName , new CallableCommandHandler ( $ handler ) ) ; } // If the handler given is a string, wrap it up in a LazyLoadingCommandHandler for loading later if ( is_string ( $ handler ) ) { return $ this -> bindHandler ( $ commandName , new LazyLoadingCommandHandler ( $ handler , $ this -> container ) ) ; } throw new \ InvalidArgumentException ( 'Could not push handler. Command Handlers should be an
            instance of Chief\CommandHandler, a callable, or a string representing a CommandHandler class' ) ; }
Bind a handler to a command. These bindings should overrule the default
resolution behaviour for this resolver

@param string $commandName
@param CommandHandler|callable|string $handler
@return void
@throws \InvalidArgumentException
Bind a handler to a command . These bindings should overrule the default resolution behaviour for this resolver