forked from La_Bureautique/zeg1jeux
57 lines
958 B
PHP
57 lines
958 B
PHP
<?php
|
|
|
|
class GchangeRecord {
|
|
|
|
private $gchangeId;
|
|
|
|
private $title;
|
|
|
|
private $description;
|
|
|
|
private $type;
|
|
|
|
private $imgSrc = null;
|
|
|
|
|
|
public function __construct ($gchangeObject) {
|
|
|
|
$this->title = $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->imgSrc = '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->imgSrc;
|
|
}
|
|
} |