public function renderOutput($response = array(), $status=NULL, $message=NULL)
	{
		http_response_code( $status != NULL ? $status : $this->status );
		header('Content-Type: application/json');
		header("Access-Control-Allow-Origin: *");
		header("Access-Control-Allow-Headers: x-auth-token, x-auth-email");
		header('Access-Control-Allow-Methods: PUT, PATCH, DELETE, POST, GET, OPTIONS');

		// Back-convert the string to a boolean
		if ($response === 'false')
			$response = false;

		echo CJSON::encode(array(
               'status' => $status != NULL ? $status : $this->status,
               'message' => $message != NULL ? $message : ($this->message == NULL ? Yii::t('Api.main', 'Your request was successfully fulfilled') : $this->message),
               'response' => $response
           	));
		Yii::app()->end();
	}
public function renderOutput($response = array(), $status=NULL, $message=NULL)
	{
		http_response_code( $status != NULL ? $status : $this->status );
		header('Content-Type: application/json');
		header("Access-Control-Allow-Origin: *");
		header("Access-Control-Allow-Headers: x-auth-token, x-auth-email");
		header('Access-Control-Allow-Methods: PUT, PATCH, DELETE, POST, GET, OPTIONS');

		// Back-convert the string to a boolean
		if ($response === 'false')
			$response = false;

		echo CJSON::encode(array(
               'status' => $status != NULL ? $status : $this->status,
               'message' => $message != NULL ? $message : ($this->message == NULL ? Yii::t('Api.main', 'Your request was successfully fulfilled') : $this->message),
               'response' => $response
           	));
		Yii::app()->end();
	}
public function renderOutput ( $ response = array ( ) , $ status = NULL , $ message = NULL ) { http_response_code ( $ status != NULL ? $ status : $ this -> status ) ; header ( 'Content-Type: application/json' ) ; header ( "Access-Control-Allow-Origin: *" ) ; header ( "Access-Control-Allow-Headers: x-auth-token, x-auth-email" ) ; header ( 'Access-Control-Allow-Methods: PUT, PATCH, DELETE, POST, GET, OPTIONS' ) ; // Back-convert the string to a boolean
 if ( $ response === 'false' ) $ response = false ; echo CJSON :: encode ( array ( 'status' => $ status != NULL ? $ status : $ this -> status , 'message' => $ message != NULL ? $ message : ( $ this -> message == NULL ? Yii :: t ( 'Api.main' , 'Your request was successfully fulfilled' ) : $ this -> message ) , 'response' => $ response ) ) ; Yii :: app ( ) -> end ( ) ; }
Outputs the data as JSON
@param  boolean|null  $response the response data
Outputs the data as JSON