Library/Bullhorn/FastRest/Generator/ControllerBuilder.php
private function buildShowAction() {
        $api = new Swagger\Api();
        $api->setPath('/' . $this->getClassName() . '/{id}');
        $operation = new Swagger\Operation();
        $operation->setMethod('GET');
        $operation->setSummary('Find ' . ucfirst($this->getModel()->getSource()) . ' by id.');
        $operation->setNotes('Returns ' . $this->singularModelA_Or_An() . ' based on ID.');

        $responseMessage = new Swagger\ResponseMessage();
        $responseMessage->setCode(200);
        $responseMessage->setMessage(ucfirst($this->getModel()->getSource()));
        $responseMessage->setResponseModel($this->getClassName());
        $operation->addResponseMessage($responseMessage);

        $responseMessage = $this->invalidFieldSpecifiedError();
        $operation->addResponseMessage($responseMessage);

        $responseMessage = $this->notAuthorizedResponse();
        $operation->addResponseMessage($responseMessage);

        $responseMessage = $this->notFoundResponse();
        $operation->addResponseMessage($responseMessage);

        $operation->addParameter($this->buildIdParameter());
        $operation->addParameter($this->buildFieldsParameter());
        $api->addOperation($operation);

        $method = new Object\Method();
        $method->setDescription($api->__toString());
        $method->setReturnType('void');
        $method->setAccess('public');
        $method->setName('showAction');
        $method->setContent('parent::showAction();');
        $this->getObject()->addMethod($method);
    }
private function buildShowAction() {
        $api = new Swagger\Api();
        $api->setPath('/' . $this->getClassName() . '/{id}');
        $operation = new Swagger\Operation();
        $operation->setMethod('GET');
        $operation->setSummary('Find ' . ucfirst($this->getModel()->getSource()) . ' by id.');
        $operation->setNotes('Returns ' . $this->singularModelA_Or_An() . ' based on ID.');

        $responseMessage = new Swagger\ResponseMessage();
        $responseMessage->setCode(200);
        $responseMessage->setMessage(ucfirst($this->getModel()->getSource()));
        $responseMessage->setResponseModel($this->getClassName());
        $operation->addResponseMessage($responseMessage);

        $responseMessage = $this->invalidFieldSpecifiedError();
        $operation->addResponseMessage($responseMessage);

        $responseMessage = $this->notAuthorizedResponse();
        $operation->addResponseMessage($responseMessage);

        $responseMessage = $this->notFoundResponse();
        $operation->addResponseMessage($responseMessage);

        $operation->addParameter($this->buildIdParameter());
        $operation->addParameter($this->buildFieldsParameter());
        $api->addOperation($operation);

        $method = new Object\Method();
        $method->setDescription($api->__toString());
        $method->setReturnType('void');
        $method->setAccess('public');
        $method->setName('showAction');
        $method->setContent('parent::showAction();');
        $this->getObject()->addMethod($method);
    }
private function buildShowAction ( ) { $ api = new Swagger \ Api ( ) ; $ api -> setPath ( '/' . $ this -> getClassName ( ) . '/{id}' ) ; $ operation = new Swagger \ Operation ( ) ; $ operation -> setMethod ( 'GET' ) ; $ operation -> setSummary ( 'Find ' . ucfirst ( $ this -> getModel ( ) -> getSource ( ) ) . ' by id.' ) ; $ operation -> setNotes ( 'Returns ' . $ this -> singularModelA_Or_An ( ) . ' based on ID.' ) ; $ responseMessage = new Swagger \ ResponseMessage ( ) ; $ responseMessage -> setCode ( 200 ) ; $ responseMessage -> setMessage ( ucfirst ( $ this -> getModel ( ) -> getSource ( ) ) ) ; $ responseMessage -> setResponseModel ( $ this -> getClassName ( ) ) ; $ operation -> addResponseMessage ( $ responseMessage ) ; $ responseMessage = $ this -> invalidFieldSpecifiedError ( ) ; $ operation -> addResponseMessage ( $ responseMessage ) ; $ responseMessage = $ this -> notAuthorizedResponse ( ) ; $ operation -> addResponseMessage ( $ responseMessage ) ; $ responseMessage = $ this -> notFoundResponse ( ) ; $ operation -> addResponseMessage ( $ responseMessage ) ; $ operation -> addParameter ( $ this -> buildIdParameter ( ) ) ; $ operation -> addParameter ( $ this -> buildFieldsParameter ( ) ) ; $ api -> addOperation ( $ operation ) ; $ method = new Object \ Method ( ) ; $ method -> setDescription ( $ api -> __toString ( ) ) ; $ method -> setReturnType ( 'void' ) ; $ method -> setAccess ( 'public' ) ; $ method -> setName ( 'showAction' ) ; $ method -> setContent ( 'parent::showAction();' ) ; $ this -> getObject ( ) -> addMethod ( $ method ) ; }
Builds the show action
@return void
Builds the show action