public function call(string $commandName, IResponse $response, array $arguments = [], array $options = [])
    {
        $request = $this->requestParser->parse([
            'name' => $commandName,
            'arguments' => $arguments,
            'options' => $options
        ]);
        $compiledCommand = $this->commandCompiler->compile($this->get($commandName), $request);

        return $compiledCommand->execute($response);
    }
public function call(string $commandName, IResponse $response, array $arguments = [], array $options = [])
    {
        $request = $this->requestParser->parse([
            'name' => $commandName,
            'arguments' => $arguments,
            'options' => $options
        ]);
        $compiledCommand = $this->commandCompiler->compile($this->get($commandName), $request);

        return $compiledCommand->execute($response);
    }
public function call ( string $ commandName , IResponse $ response , array $ arguments = [ ] , array $ options = [ ] ) { $ request = $ this -> requestParser -> parse ( [ 'name' => $ commandName , 'arguments' => $ arguments , 'options' => $ options ] ) ; $ compiledCommand = $ this -> commandCompiler -> compile ( $ this -> get ( $ commandName ) , $ request ) ; return $ compiledCommand -> execute ( $ response ) ; }
Calls a command and writes its output to the input response

@param string $commandName The name of the command to run
@param IResponse $response The response to write output to
@param array $arguments The list of arguments
@param array $options The list of options
@return int|null The status code of the command
@throws InvalidArgumentException Thrown if no command exists with the input name
Calls a command and writes its output to the input response