123456789101112131415161718192021222324252627282930313233343536373839 |
- <?php
- /**
- * NewsUtils.php UTF-8
- *
- *
- * @date : 2018/5/4 15:21
- *
- * @license 这不是一个自由软件,未经授权不许任何使用和传播。
- * @author : wuyonghong <wyh@huosdk.com>
- * @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;
- }
- }
|