src/ArtaxServiceBuilder/OperationGenerator.php
function generate() {

        if ($this->namespace) {
            $fqcn = $this->namespace.'\\'.$this->className;
        }
        else {
            $fqcn = $this->className;
        }

        $this->addProperties();
        $this->addConstructorMethod();
        $this->addSetAPIMethod();
        $this->addSetParameterMethod();
        $this->addCheckScopeMethod();
        $this->addAccessorMethods();
        $this->addFilteredParameterMethod();
        $this->addCreateRequestMethod();
        $this->addCreateAndExecuteMethod();
        $this->addCallMethod();
        
        $this->addExecuteMethod();
        $this->addExecuteAsyncMethod();
        $this->addDispatchMethod();
        $this->addDispatchAsyncMethod();
        $this->addProcessResponseMethod();
        //$this->addIsErrorResponseMethod();
        $this->addShouldResponseBeProcessedMethod();
        $this->addTranslateResponseToExceptionMethod();
        $this->addShouldUseCachedResponseMethod();
        $this->addShouldResponseBeCachedMethod();
        $this->addSetOriginalResponseMethod();
        $this->addGetOriginalResponseMethod();
        $this->addGetResultInstantiationInfoMethod();

        $this->classGenerator->setImplementedInterfaces(['ArtaxServiceBuilder\Operation']);
        $this->classGenerator->setFQCN($fqcn);
        $text = $this->classGenerator->generate();
        saveFile($this->outputPath, $fqcn, $text);
    }
function generate() {

        if ($this->namespace) {
            $fqcn = $this->namespace.'\\'.$this->className;
        }
        else {
            $fqcn = $this->className;
        }

        $this->addProperties();
        $this->addConstructorMethod();
        $this->addSetAPIMethod();
        $this->addSetParameterMethod();
        $this->addCheckScopeMethod();
        $this->addAccessorMethods();
        $this->addFilteredParameterMethod();
        $this->addCreateRequestMethod();
        $this->addCreateAndExecuteMethod();
        $this->addCallMethod();
        
        $this->addExecuteMethod();
        $this->addExecuteAsyncMethod();
        $this->addDispatchMethod();
        $this->addDispatchAsyncMethod();
        $this->addProcessResponseMethod();
        //$this->addIsErrorResponseMethod();
        $this->addShouldResponseBeProcessedMethod();
        $this->addTranslateResponseToExceptionMethod();
        $this->addShouldUseCachedResponseMethod();
        $this->addShouldResponseBeCachedMethod();
        $this->addSetOriginalResponseMethod();
        $this->addGetOriginalResponseMethod();
        $this->addGetResultInstantiationInfoMethod();

        $this->classGenerator->setImplementedInterfaces(['ArtaxServiceBuilder\Operation']);
        $this->classGenerator->setFQCN($fqcn);
        $text = $this->classGenerator->generate();
        saveFile($this->outputPath, $fqcn, $text);
    }
function generate ( ) { if ( $ this -> namespace ) { $ fqcn = $ this -> namespace . '\\' . $ this -> className ; } else { $ fqcn = $ this -> className ; } $ this -> addProperties ( ) ; $ this -> addConstructorMethod ( ) ; $ this -> addSetAPIMethod ( ) ; $ this -> addSetParameterMethod ( ) ; $ this -> addCheckScopeMethod ( ) ; $ this -> addAccessorMethods ( ) ; $ this -> addFilteredParameterMethod ( ) ; $ this -> addCreateRequestMethod ( ) ; $ this -> addCreateAndExecuteMethod ( ) ; $ this -> addCallMethod ( ) ; $ this -> addExecuteMethod ( ) ; $ this -> addExecuteAsyncMethod ( ) ; $ this -> addDispatchMethod ( ) ; $ this -> addDispatchAsyncMethod ( ) ; $ this -> addProcessResponseMethod ( ) ; //$this->addIsErrorResponseMethod(); $ this -> addShouldResponseBeProcessedMethod ( ) ; $ this -> addTranslateResponseToExceptionMethod ( ) ; $ this -> addShouldUseCachedResponseMethod ( ) ; $ this -> addShouldResponseBeCachedMethod ( ) ; $ this -> addSetOriginalResponseMethod ( ) ; $ this -> addGetOriginalResponseMethod ( ) ; $ this -> addGetResultInstantiationInfoMethod ( ) ; $ this -> classGenerator -> setImplementedInterfaces ( [ 'ArtaxServiceBuilder\Operation' ] ) ; $ this -> classGenerator -> setFQCN ( $ fqcn ) ; $ text = $ this -> classGenerator -> generate ( ) ; saveFile ( $ this -> outputPath , $ fqcn , $ text ) ; }
Generate the complete operation class and save it to the filesystem.
@throws \ArtaxServiceBuilder\APIBuilderException
Generate the complete operation class and save it to the filesystem .