Example #1
0
 /**
  * @param $data
  */
 function __construct($data)
 {
     parent::__construct($data);
     $this->list = new \ArrayObject();
     if (isset($this->obj->list)) {
         foreach ($this->obj->list as $res) {
             $this->list->append(new MessageResponse($res->id, $res->points, $res->number, $res->status, $res->error, $res->idx));
         }
     }
 }
 /**
  * @param $data
  */
 function __construct($data)
 {
     parent::__construct($data);
     $this->list = new \ArrayObject();
     if (isset($this->obj->list)) {
         foreach ($this->obj->list as $res) {
             $this->list->append(new MessageResponse($res->id, $res->points, $res->number, $res->status, $res->error, $res->idx));
         }
     }
     if (isset($this->obj->message)) {
         $this->message = (string) $this->obj->message;
     }
     if (isset($this->obj->length)) {
         $this->length = (int) $this->obj->length;
     }
     if (isset($this->obj->parts)) {
         $this->parts = (int) $this->obj->parts;
     }
 }