public function __construct(Api $api, $data) { if ($data !== NULL) { $this->mature = $data->mature; $this->status = $data->status; $this->game = $data->game; $this->id = $data->_id; $this->displayName = $data->display_name; $this->name = $data->name; $this->created = Helpers::createDate($data->created_at); $this->updated = Helpers::createDate($data->updated_at); $this->logo = $data->logo; $this->banner = $data->banner; $this->videoBanner = $data->video_banner; $this->background = $data->background; $this->url = $data->url; $teams = array(); foreach ($data->teams as $team) { $teams[] = new Team($api, $team); } $this->teams = $teams; unset($data->teams); } parent::__construct($api, $data); }
public function __construct(Api $api, $data) { if ($data !== NULL) { $this->default = $data->default; $this->name = $data->name; $this->id = $data->_id; $this->urlTemplate = $data->url_template; $this->availability = (double) $data->availability; } parent::__construct($api, $data); }
public function __construct(Api $api, $data) { if ($data !== NULL) { $this->regex = $data->regex; $this->images = array(); foreach ($data->images as $image) { $this->images[] = array('emoticonSet' => $image->emoticonSet, 'width' => $image->width, 'height' => $image->height, 'url' => $image->url); } } parent::__construct($api, $data); }
public function __construct(Api $api, $data) { if ($data !== NULL) { $this->staff = $data->staff; $this->id = $data->_id; $this->name = $data->name; $this->displayName = $data->display_name; $this->logo = $data->logo; $this->created = Helpers::createDate($data->created_at); $this->updated = Helpers::createDate($data->updated_at); } parent::__construct($api, $data); }
public function __construct(Api $api, $data) { if ($data !== NULL) { $this->name = $data->name; $this->box = $data->box; $this->logo = $data->logo; $this->id = $data->_id; $this->viewers = isset($data->viewers) ? $data->viewers : NULL; $this->channels = isset($data->channels) ? $data->channels : NULL; $this->popularity = isset($data->popularity) ? $data->popularity : NULL; } parent::__construct($api, $data); }
public function __construct(Api $api, $data) { if ($data !== NULL) { $this->online = TRUE; $this->id = $data->_id; $this->broadcaster = $data->broadcaster; $this->name = $data->name; $this->viewers = $data->viewers; $this->game = $data->game; $this->preview = $data->preview; $this->channel = new Channel($api, $data->channel); } parent::__construct($api, $data); }
public function __construct(Api $api, $data) { if ($data !== NULL) { $this->id = $data->_id; $this->name = $data->name; $this->displayName = $data->display_name; $this->info = trim($data->info); $this->created = Helpers::createDate($data->created_at); $this->updated = Helpers::createDate($data->updated_at); $this->logo = $data->logo; $this->banner = $data->banner; $this->background = $data->background; } parent::__construct($api, $data); }
public function __construct(Api $api, $data) { if ($data !== NULL) { $this->title = $data->title; $this->recorded = Helpers::createDate($data->recorded_at); $this->url = $data->url; $this->id = $data->_id; $this->embed = $data->embed; $this->views = $data->views; $this->description = $data->description; $this->length = $data->length; $this->game = $data->game; $this->preview = $data->preview; } parent::__construct($api, $data); }