/** * Sets object properties from array uses populate from vivvo_framework * * @param array $row */ function populate($row, $dump = NULL) { $status = parent::populate($row, $dump); $this->answer =& new vivvo_poll_answer_list(vivvo_lite_site::get_instance()); $this->answer->get_answer($this->id); return $status; }
/** * Populate object properties * * @param array $data * @param bool $dump * @return bool */ public function populate($data, $dump = null) { if ($status = parent::populate($data, $dump) and $this->user_id) { $user = vivvo_lite_site::get_instance()->get_user_manager()->get_user_by_id($this->user_id); if ($user) { $this->set_author($user->get_name()); $this->set_www($user->get_www()); $this->set_email($user->get_email_address()); $this->author_href = $user->get_href(); $this->avatar_url = $user->get_picture(); if ($this->avatar_url and !preg_match('/^[^:\\/\\.\\?]+:/', $this->avatar_url)) { $this->avatar_url = VIVVO_STATIC_URL . 'thumbnail.php?size=avatar&file=' . $this->avatar_url; } } } return $status; }