* @version : HUOSDK 8.0 */ namespace huolib\utils; use huolib\constant\GameConst; use huolib\constant\NewsConst; use huolib\status\NewsStatus; class NewsUtils { /** * 校验资讯类型 * * @param int $post_type * * @return int */ public static function checkNewsType($post_type = 0) { if (empty($post_type)) { return NewsStatus::NO_ERROR; } $_rs = NewsConst::getNewsMsg($post_type); if (false == $_rs) { return NewsStatus::NEWS_TYPE_ERROR; } return NewsStatus::NO_ERROR; } }