Пример #1
0
 function __construct($identifier,$user_id, $expiration_date, $request_hash) {
     parent::__construct($identifier);
     
     $this->user_id = $user_id;
      
     $this->request_hash = $request_hash;
     
     if ($expiration instanceof DateTime) {
         $this->expiration_date = $expiration_date;
     } else {
         $this->expiration_date = new DateTime($expiration_date, new DateTimeZone('UTC'));
     }
 }
Пример #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;
 }
Пример #3
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;
 }
Пример #4
0
 public function __construct($identifier, $secret)
 {
     parent::__construct($identifier);
     $this->appSecret = $secret;
 }
Пример #5
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;
 }