<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Photo\Util; use Illuminate\Support\Facades\Session; class PhotoAuthUtil { public static function getAuthCategoryIds() { goto o2ZcV; VDb2y: return $gUMqk; goto ATy_r; rsiDN: if (empty($gUMqk)) { $gUMqk = array(); } goto VDb2y; o2ZcV: $gUMqk = @json_decode(Session::get('authCategoryIds', null), true); goto rsiDN; ATy_r: } public static function isAuth($gf2oi) { return in_array(intval($gf2oi), self::getAuthCategoryIds()); } public static function putAuth($gf2oi) { goto xEdD7; xEdD7: $y2SDh = self::getAuthCategoryIds(); goto VLq75; Yzd3a: Session::put('authCategoryIds', json_encode(array_unique($y2SDh))); goto R3PpX; VLq75: $y2SDh[] = intval($gf2oi); goto Yzd3a; R3PpX: } }