src/Controller.php
protected function jsonReturn(array $array, $httpCode = 200, $contentType = 'application/json')
    {
        return $this->response->setHeader('Content-Type', $contentType)
            ->setStatusCode($httpCode)
            ->setJsonContent($array);
    }
protected function jsonReturn(array $array, $httpCode = 200, $contentType = 'application/json')
    {
        return $this->response->setHeader('Content-Type', $contentType)
            ->setStatusCode($httpCode)
            ->setJsonContent($array);
    }
protected function jsonReturn ( array $ array , $ httpCode = 200 , $ contentType = 'application/json' ) { return $ this -> response -> setHeader ( 'Content-Type' , $ contentType ) -> setStatusCode ( $ httpCode ) -> setJsonContent ( $ array ) ; }
response json content

@param array  $array
@param int    $httpCode
@param string $contentType
@return \Phalcon\Http\Response
response json content