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->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->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); }