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