src/ArtaxServiceBuilder/OperationGenerator.php
function addDispatchMethod() {
        $methodGenerator = new MethodGenerator('dispatch');

        $body = '';
        $body .= $this->generateExecuteFragment();
        $body .= $this->generateResponseFragment();

        $docBlock = $this->generateExecuteDocBlock('Dispatch the request for this operation and process the response. Allows you to modify the request before it is sent.');

        $parameter = new ParameterGenerator('request', 'Amp\Artax\Request');
        $methodGenerator->setParameter($parameter);

        $tag = createParamTag($parameter, 'The request to be processed');
        $docBlock->setTag($tag);

        $methodGenerator->setDocBlock($docBlock);
        $methodGenerator->setBody($body);
        
        $this->classGenerator->addMethodFromGenerator($methodGenerator);
    }
function addDispatchMethod() {
        $methodGenerator = new MethodGenerator('dispatch');

        $body = '';
        $body .= $this->generateExecuteFragment();
        $body .= $this->generateResponseFragment();

        $docBlock = $this->generateExecuteDocBlock('Dispatch the request for this operation and process the response. Allows you to modify the request before it is sent.');

        $parameter = new ParameterGenerator('request', 'Amp\Artax\Request');
        $methodGenerator->setParameter($parameter);

        $tag = createParamTag($parameter, 'The request to be processed');
        $docBlock->setTag($tag);

        $methodGenerator->setDocBlock($docBlock);
        $methodGenerator->setBody($body);
        
        $this->classGenerator->addMethodFromGenerator($methodGenerator);
    }
function addDispatchMethod ( ) { $ methodGenerator = new MethodGenerator ( 'dispatch' ) ; $ body = '' ; $ body .= $ this -> generateExecuteFragment ( ) ; $ body .= $ this -> generateResponseFragment ( ) ; $ docBlock = $ this -> generateExecuteDocBlock ( 'Dispatch the request for this operation and process the response. Allows you to modify the request before it is sent.' ) ; $ parameter = new ParameterGenerator ( 'request' , 'Amp\Artax\Request' ) ; $ methodGenerator -> setParameter ( $ parameter ) ; $ tag = createParamTag ( $ parameter , 'The request to be processed' ) ; $ docBlock -> setTag ( $ tag ) ; $ methodGenerator -> setDocBlock ( $ docBlock ) ; $ methodGenerator -> setBody ( $ body ) ; $ this -> classGenerator -> addMethodFromGenerator ( $ methodGenerator ) ; }
Add a method to execute and parse the response of a previously created request.
Add a method to execute and parse the response of a previously created request .