Library/Bullhorn/FastRest/Generator/ControllerBuilder.php
private function buildIndexAction() {
        $api = new Swagger\Api();
        $api->setPath('/' . $this->getClassName());
        $operation = new Swagger\Operation();
        $operation->setMethod('GET');
        $operation->setSummary('Lists all ' . $this->getClassName() . '.');
        $operation->setNotes(
            'Only returns the first 50 by default. Using the actual API you can search by parent fields and any field on the model as opposed to the brief list provided below.'
        );
        $responseMessage = new Swagger\ResponseMessage();
        $responseMessage->setCode(200);
        $responseMessage->setMessage('List of ' . $this->getClassName() . '.');
        $responseMessage->setResponseModel($this->getClassName());
        $operation->addResponseMessage($responseMessage);

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

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

        $operation->addParameter($this->buildStartParameter());
        $operation->addParameter($this->buildCountParameter());
        $operation->addParameter($this->buildSortParameter());
        $operation->addParameter($this->buildFieldsParameter());
        $searchParameters = $this->buildSearchParameters();
        foreach($searchParameters as $searchParameter) {
            $operation->addParameter($searchParameter);
        }
        $api->addOperation($operation);

        $method = new Object\Method();
        $method->setDescription($api->__toString());
        $method->setReturnType('void');
        $method->setAccess('public');
        $method->setName('indexAction');
        $method->setContent('parent::indexAction();');
        $this->getObject()->addMethod($method);
    }
private function buildIndexAction() {
        $api = new Swagger\Api();
        $api->setPath('/' . $this->getClassName());
        $operation = new Swagger\Operation();
        $operation->setMethod('GET');
        $operation->setSummary('Lists all ' . $this->getClassName() . '.');
        $operation->setNotes(
            'Only returns the first 50 by default. Using the actual API you can search by parent fields and any field on the model as opposed to the brief list provided below.'
        );
        $responseMessage = new Swagger\ResponseMessage();
        $responseMessage->setCode(200);
        $responseMessage->setMessage('List of ' . $this->getClassName() . '.');
        $responseMessage->setResponseModel($this->getClassName());
        $operation->addResponseMessage($responseMessage);

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

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

        $operation->addParameter($this->buildStartParameter());
        $operation->addParameter($this->buildCountParameter());
        $operation->addParameter($this->buildSortParameter());
        $operation->addParameter($this->buildFieldsParameter());
        $searchParameters = $this->buildSearchParameters();
        foreach($searchParameters as $searchParameter) {
            $operation->addParameter($searchParameter);
        }
        $api->addOperation($operation);

        $method = new Object\Method();
        $method->setDescription($api->__toString());
        $method->setReturnType('void');
        $method->setAccess('public');
        $method->setName('indexAction');
        $method->setContent('parent::indexAction();');
        $this->getObject()->addMethod($method);
    }
private function buildIndexAction ( ) { $ api = new Swagger \ Api ( ) ; $ api -> setPath ( '/' . $ this -> getClassName ( ) ) ; $ operation = new Swagger \ Operation ( ) ; $ operation -> setMethod ( 'GET' ) ; $ operation -> setSummary ( 'Lists all ' . $ this -> getClassName ( ) . '.' ) ; $ operation -> setNotes ( 'Only returns the first 50 by default. Using the actual API you can search by parent fields and any field on the model as opposed to the brief list provided below.' ) ; $ responseMessage = new Swagger \ ResponseMessage ( ) ; $ responseMessage -> setCode ( 200 ) ; $ responseMessage -> setMessage ( 'List of ' . $ this -> getClassName ( ) . '.' ) ; $ responseMessage -> setResponseModel ( $ this -> getClassName ( ) ) ; $ operation -> addResponseMessage ( $ responseMessage ) ; $ responseMessage = $ this -> invalidFieldSpecifiedError ( ) ; $ operation -> addResponseMessage ( $ responseMessage ) ; $ responseMessage = $ this -> notAuthorizedResponse ( ) ; $ operation -> addResponseMessage ( $ responseMessage ) ; $ operation -> addParameter ( $ this -> buildStartParameter ( ) ) ; $ operation -> addParameter ( $ this -> buildCountParameter ( ) ) ; $ operation -> addParameter ( $ this -> buildSortParameter ( ) ) ; $ operation -> addParameter ( $ this -> buildFieldsParameter ( ) ) ; $ searchParameters = $ this -> buildSearchParameters ( ) ; foreach ( $ searchParameters as $ searchParameter ) { $ operation -> addParameter ( $ searchParameter ) ; } $ api -> addOperation ( $ operation ) ; $ method = new Object \ Method ( ) ; $ method -> setDescription ( $ api -> __toString ( ) ) ; $ method -> setReturnType ( 'void' ) ; $ method -> setAccess ( 'public' ) ; $ method -> setName ( 'indexAction' ) ; $ method -> setContent ( 'parent::indexAction();' ) ; $ this -> getObject ( ) -> addMethod ( $ method ) ; }
Builds the index action
@return void
Builds the index action