public static function decodeServerResponse($json) { $jsonObject = (array) $json; foreach ($jsonObject as $key => &$val) { $val = DatumConverter::decodedJSONToDatum($val); unset($val); } $result = new ObjectDatum(); $result->setValue($jsonObject); return $result; }
public static function decodeServerResponse($json) { $jsonArray = array_values((array) $json); foreach ($jsonArray as &$val) { $val = DatumConverter::decodedJSONToDatum($val); unset($val); } $result = new ArrayDatum(); $result->setValue($jsonArray); return $result; }
private function setBatch($response) { $dc = new DatumConverter(); $this->isComplete = $response['t'] == ResponseResponseType::PB_SUCCESS_SEQUENCE; $this->currentIndex = 0; $this->currentSize = \count($response['r']); $this->currentData = array(); foreach ($response['r'] as $row) { $this->currentData[] = $datum = $dc->decodedJSONToDatum($row); } }