function addDispatchAsyncMethod() {
        $methodGenerator = new MethodGenerator('dispatchAsync');
        $body = 'return $this->api->executeAsync($request, $this, $callable);';

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

        $requestParameter = new ParameterGenerator('request', 'Amp\Artax\Request');
        $methodGenerator->setParameter($requestParameter);
        $tag = createParamTag($requestParameter, 'The request to be processed');
        $docBlock->setTag($tag);

        $callableParameter = new ParameterGenerator('callable', 'callable');
        $methodGenerator->setParameter($callableParameter);
        $callableTag = createParamTag($callableParameter, 'The callable that processes the response');
        $docBlock->setTag($callableTag);

        $methodGenerator->setDocBlock($docBlock);
        $methodGenerator->setBody($body);

        $this->classGenerator->addMethodFromGenerator($methodGenerator);
    }
function addDispatchAsyncMethod() {
        $methodGenerator = new MethodGenerator('dispatchAsync');
        $body = 'return $this->api->executeAsync($request, $this, $callable);';

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

        $requestParameter = new ParameterGenerator('request', 'Amp\Artax\Request');
        $methodGenerator->setParameter($requestParameter);
        $tag = createParamTag($requestParameter, 'The request to be processed');
        $docBlock->setTag($tag);

        $callableParameter = new ParameterGenerator('callable', 'callable');
        $methodGenerator->setParameter($callableParameter);
        $callableTag = createParamTag($callableParameter, 'The callable that processes the response');
        $docBlock->setTag($callableTag);

        $methodGenerator->setDocBlock($docBlock);
        $methodGenerator->setBody($body);

        $this->classGenerator->addMethodFromGenerator($methodGenerator);
    }
function addDispatchAsyncMethod ( ) { $ methodGenerator = new MethodGenerator ( 'dispatchAsync' ) ; $ body = 'return $this->api->executeAsync($request, $this, $callable);' ; $ docBlock = $ this -> generateExecuteDocBlock ( 'Dispatch the request for this operation and process the response asynchronously. Allows you to modify the request before it is sent.' ) ; $ requestParameter = new ParameterGenerator ( 'request' , 'Amp\Artax\Request' ) ; $ methodGenerator -> setParameter ( $ requestParameter ) ; $ tag = createParamTag ( $ requestParameter , 'The request to be processed' ) ; $ docBlock -> setTag ( $ tag ) ; $ callableParameter = new ParameterGenerator ( 'callable' , 'callable' ) ; $ methodGenerator -> setParameter ( $ callableParameter ) ; $ callableTag = createParamTag ( $ callableParameter , 'The callable that processes the response' ) ; $ docBlock -> setTag ( $ callableTag ) ; $ methodGenerator -> setDocBlock ( $ docBlock ) ; $ methodGenerator -> setBody ( $ body ) ; $ this -> classGenerator -> addMethodFromGenerator ( $ methodGenerator ) ; }
Add a method to asynchronousl execute and parse the response of a previously created request.
Add a method to asynchronousl execute and parse the response of a previously created request .