add missing functions; used when outputbuffering is active; may not be complete; as we never use InitResponseArray

This commit is contained in:
Klaus Leithoff 2012-12-13 16:32:02 +00:00
parent ee4ceba548
commit 3367609f45

View File

@ -195,6 +195,16 @@ class egw_json_response
return isset(self::$response);
}
/**
* Do we have a JSON response to send back
*
* @return boolean
*/
public function haveJSONResponse()
{
return (boolean) $this->responseArray;
}
/**
* Private function used to send the HTTP header of the JSON response
*/
@ -260,6 +270,20 @@ class egw_json_response
);
}
/**
* Init responseArray
*
* @param array $arr
* @return array previous content
*/
public function initResponseArray()
{
$return = $this->responseArray;
$this->responseArray = array();
$this->hasData = false;
return $return;
}
/**
* Adds a "data" response to the json response.
*