src/PortaText/Command/Base.php
protected function run($method)
    {
        $endpoint = $this->getEndpoint($method);
        $outputFile = $this->getArgument('accept_file');
        if (is_null($outputFile)) {
            $outputFile = $this->getArgument('accept_any_file');
        }
        if (is_null($outputFile)) {
            $outputFile = $this->getArgument('accept_sound_file');
        }
        $cType = $this->getContentType($method);
        $aCType = $this->getAcceptContentType($method);
        $this->delArgument('accept_file');
        $this->delArgument('accept_any_file');
        $this->delArgument('accept_sound_file');
        $body = $this->getBody($method);
        return $this->client->run(
            $endpoint,
            $method,
            $cType,
            $aCType,
            $body,
            $outputFile
        );
    }
protected function run($method)
    {
        $endpoint = $this->getEndpoint($method);
        $outputFile = $this->getArgument('accept_file');
        if (is_null($outputFile)) {
            $outputFile = $this->getArgument('accept_any_file');
        }
        if (is_null($outputFile)) {
            $outputFile = $this->getArgument('accept_sound_file');
        }
        $cType = $this->getContentType($method);
        $aCType = $this->getAcceptContentType($method);
        $this->delArgument('accept_file');
        $this->delArgument('accept_any_file');
        $this->delArgument('accept_sound_file');
        $body = $this->getBody($method);
        return $this->client->run(
            $endpoint,
            $method,
            $cType,
            $aCType,
            $body,
            $outputFile
        );
    }
protected function run ( $ method ) { $ endpoint = $ this -> getEndpoint ( $ method ) ; $ outputFile = $ this -> getArgument ( 'accept_file' ) ; if ( is_null ( $ outputFile ) ) { $ outputFile = $ this -> getArgument ( 'accept_any_file' ) ; } if ( is_null ( $ outputFile ) ) { $ outputFile = $ this -> getArgument ( 'accept_sound_file' ) ; } $ cType = $ this -> getContentType ( $ method ) ; $ aCType = $ this -> getAcceptContentType ( $ method ) ; $ this -> delArgument ( 'accept_file' ) ; $ this -> delArgument ( 'accept_any_file' ) ; $ this -> delArgument ( 'accept_sound_file' ) ; $ body = $ this -> getBody ( $ method ) ; return $ this -> client -> run ( $ endpoint , $ method , $ cType , $ aCType , $ body , $ outputFile ) ; }
Runs this command with the given method and returns the result.

@param string $method HTTP Method to use.

@return PortaText\Command\ICommand
@throws PortaText\Exception\RequestError
Runs this command with the given method and returns the result .