123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136 |
- <?php
- namespace huolib\queue\request;
- class Game extends Request {
- private $pkg_name = '';
- private $app_ver = '';
- private $h_ver = 0;
- private $sdk_ver = '';
- private $h_app_id = 0;
- public function __construct($data = []) {
- if (!empty($data)) {
- $this->setData($data);
- }
- }
-
- public function setData($data = []) {
- if (empty($data)) {
- return;
- }
- $this->setPkgName(get_val($data, 'pkg_name', ''));
- $this->setAppVer(get_val($data, 'app_ver', ''));
- $this->setHVer(get_val($data, 'h_ver', 0));
- $this->setSdkVer(get_val($data, 'sdk_ver', ''));
- $this->setHAppId(get_val($data, 'h_app_id', 0));
- }
-
- public function toArray() {
- $_data = [
- 'pkg_name' => $this->getPkgName(),
- 'app_ver' => $this->getAppVer(),
- 'h_ver' => $this->getHVer(),
- 'sdk_ver' => $this->getSdkVer(),
- 'app_id' => $this->getHAppId(),
- ];
- return $_data;
- }
-
- public function check() {
-
- return true;
- }
-
- public function getPkgName() {
- return $this->pkg_name;
- }
-
- public function setPkgName($pkg_name) {
- $this->pkg_name = $pkg_name;
- }
-
- public function getAppVer() {
- return $this->app_ver;
- }
-
- public function setAppVer($app_ver) {
- $this->app_ver = $app_ver;
- }
-
- public function getHVer() {
- return $this->h_ver;
- }
-
- public function setHVer($h_ver) {
- $this->h_ver = $h_ver;
- }
-
- public function getSdkVer() {
- return $this->sdk_ver;
- }
-
- public function setSdkVer($sdk_ver) {
- $this->sdk_ver = $sdk_ver;
- }
-
- public function getHAppId() {
- return $this->h_app_id;
- }
-
- public function setHAppId($h_app_id) {
- $this->h_app_id = $h_app_id;
- }
- }
|