gchangeId = $gchangeObject->_id; $this->type = $gchangeObject->_source->type; $this->title = $gchangeObject->_source->title; $this->description = $gchangeObject->_source->description; 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 getGchangeId () { return $this->gchangeId; } public function getType () { return $this->type; } public function getTitle () { return $this->title; } public function getDescription () { return $this->description; } public function getImgSrc () { return $this->getAvatarImgSrc(); } }