Exemplo n.º 1
0
 /**
  * Устанавливает состояния полей из массива
  * 
  * @param array $resArray
  */
 private function setData($resArray)
 {
     $this->name = $resArray["name"];
     $this->secondName = $resArray["second_name"];
     $this->burthday = $resArray["burthday"];
     $this->mail = $resArray["mail"];
     $this->photo = $resArray["photo"];
     $this->ip = $resArray["ip"];
     $this->id = $resArray["id"];
     $this->isOnline = $this->isOnline();
     $this->location = new UserLocation(array("countryId" => $resArray["country"], "regionId" => $resArray["region"], "cityId" => $resArray["city"]), $this);
     $arrLoc = $this->location->getLocation();
     $this->zodiac = Zodiac::calculateByDate($this->burthday);
     $this->utc = $resArray["utc_time"];
     $status = new UserStatus($this->id);
     $this->status = $status->getStatus();
     if ($this->other) {
         $this->lastUpdate = $resArray["update_time"];
     }
 }