123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
- namespace huolib\utils;
- use huolib\constant\GameConst;
- use huolib\status\DeviceStatus;
- use huolib\status\GameStatus;
- class GameUtils {
-
- public static function checkGame($game_data = []) {
- if (empty($game_data)) {
- return DeviceStatus::INVALID_PARAMS;
- }
- return DeviceStatus::NO_ERROR;
- }
-
- public static function checkServerType($server_type = 0) {
- if (empty($server_type)) {
- return GameStatus::NO_ERROR;
- }
- $_rs = GameConst::getServerMsg($server_type);
- if (false == $_rs) {
- return GameStatus::SERVER_TYPE_ERROR;
- }
- return GameStatus::NO_ERROR;
- }
- }
|