You are here

public function TwitterUser::__construct in Twitter 6.5

Same name and namespace in other branches
  1. 6.3 twitter.lib.php \TwitterUser::__construct()
  2. 7.3 twitter.lib.php \TwitterUser::__construct()
  3. 7.5 twitter.lib.php \TwitterUser::__construct()

File

./twitter.lib.php, line 1365
Integration layer to communicate with the Twitter REST API 1.1. https://dev.twitter.com/docs/api/1.1

Class

TwitterUser

Code

public function __construct($values = array()) {
  $this->id = $values['id'];
  $this->screen_name = $values['screen_name'];
  $this->name = $values['name'];
  $this->location = $values['location'];
  $this->description = $values['description'];
  $this->url = $values['url'];
  $this->followers_count = $values['followers_count'];
  $this->friends_count = $values['friends_count'];
  $this->statuses_count = $values['statuses_count'];
  $this->favourites_count = $values['favourites_count'];
  $this->protected = $values['protected'];
  $this->profile_image_url = $values['profile_image_url'];
  $this->profile_background_color = $values['profile_background_color'];
  $this->profile_text_color = $values['profile_text_color'];
  $this->profile_link_color = $values['profile_link_color'];
  $this->profile_sidebar_fill_color = $values['profile_sidebar_fill_color'];
  $this->profile_sidebar_border_color = $values['profile_sidebar_border_color'];
  $this->profile_background_image_url = $values['profile_background_image_url'];
  $this->profile_background_tile = $values['profile_background_tile'];
  $this->verified = $values['verified'];
  $this->created_at = $values['created_at'];
  if (!empty($values['uid'])) {
    $this->uid = $values['uid'];
  }
  if (!empty($values['created_at']) && ($created_time = strtotime($values['created_at']))) {
    $this->created_time = $created_time;
  }
  $this->utc_offset = $values['utc_offset'] ? $values['utc_offset'] : 0;
  if (isset($values['status'])) {
    $this->status = new TwitterStatus($values['status']);
  }
}