gchangeObject = $gchangeObject; $this->userGchangeId = $gchangeObject->_id; if (isset($gchangeObject->found) and $gchangeObject->found == false) { $this->userName = substr($gchangeObject->_id, 0, 8); } else { if (isset($gchangeObject->_source->title)) { $this->userName = $gchangeObject->_source->title; } if (isset($gchangeObject->_source->geoPoint->lat, $gchangeObject->_source->geoPoint->lon)) { $this->lat = $gchangeObject->_source->geoPoint->lat; $this->lon = $gchangeObject->_source->geoPoint->lon; } if (isset($gchangeObject->_source->avatar->_content) and !empty($gchangeObject->_source->avatar->_content)) { $this->avatarImgSrc = 'data:'. $gchangeObject->_source->avatar->_content_type .';base64,' . $gchangeObject->_source->avatar->_content; } } } public function getUserGchangeId () { return $this->userGchangeId; } public function getUserName () { return $this->userName; } public function jsonify () { return $this->gchangeObject; } }