Exemplo n.º 1
0
 public function jsonSerialize() {
     $ret = parent::jsonSerialize();
     $ret['language_code'] = $this->language_code;
     $ret['text'] =$this->comment ;
     $ret['site'] =$this->site ;
     $ret['user'] =$this->user ;
     $ret['points'] =$this->getVote() ;
     $ret['uasbility'] = $this->usability;
     $ret['reliability'] = $this->reliability;
     $ret['contents'] = $this->contents;
     $ret['date_added'] = $this->date_added->format(DateTime::RFC1123);
     //$ret['evaluations'] = $this->evaluations;
     return $ret;
 }
Exemplo n.º 2
0
 public function jsonSerialize()
 {
     $arr = parent::jsonSerialize();
     $arr['category'] = $this->category;
     $arr['date_added'] = $this->date_added->getTimestamp();
     if ($this->tld != NULL) {
         $arr['tld'] = $this->tld;
     }
     $arr['url'] = $this->domain;
     $arr['vote'] = $this->getVote();
     $arr['voteNum'] = $this->number_of_votes;
     $arr['usability'] = $this->usability;
     $arr['reliability'] = $this->reliability;
     $arr['contents'] = $this->contents;
     return $arr;
 }
Exemplo n.º 3
0
 public function jsonSerialize() {
     $arr = parent::jsonSerialize();
     $arr['name'] = $this->name;
     $arr['username'] = $this->username;
     //$arr['email'] = $this->email;
     $arr['surname'] = $this->surname;
     $arr['creation_date'] = $this->creation_date->getTimestamp();
     $arr['penalties'] = $this->penalties;
     return $arr;
 }