<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Vendor\Util; use ModStart\Core\Exception\BizException; use ModStart\Core\Util\TreeUtil; class FilterUtil { private static function categoryGet($oWI5F, $FhIQB) { foreach ($oWI5F as $E1PcT) { if ($E1PcT['id'] == $FhIQB) { return $E1PcT; } } return null; } public static function categoryTreeFilter($EpzDG, $oWI5F, $xEu2g = 'title', $HVCbm = 'pid') { goto od7WG; oB_ZX: $ADxfe = array($EpzDG); goto o4xw3; ZzDUm: $ADxfe = array_merge($ADxfe, $Jb71q); goto u5OkN; rol_x: return array($E1PcT, $ADxfe, $RRvlb, $cfCgW, $tGx1j); goto pzkVo; zlQm8: $E1PcT = null; goto klK7R; od7WG: $cfCgW = array(); goto GVz61; o4xw3: $Jb71q = TreeUtil::nodesChildrenIds($oWI5F, $EpzDG); goto ZzDUm; u5OkN: $RRvlb = TreeUtil::nodesChainWithItems($oWI5F, $EpzDG); goto rol_x; GVz61: $tGx1j = array(); goto zlQm8; klK7R: if ($EpzDG) { goto sS5fK; pdMF2: BizException::throwsIfEmpty('分类不存在', $E1PcT); goto Y37QQ; g_mrF: if ($E1PcT[$HVCbm]) { $aYqKi = self::categoryGet($oWI5F, $E1PcT[$HVCbm]); $tGx1j[] = $aYqKi[$xEu2g]; } goto TUXMK; bL90C: $tGx1j[] = $E1PcT[$xEu2g]; goto g_mrF; sS5fK: $E1PcT = self::categoryGet($oWI5F, $EpzDG); goto pdMF2; Y37QQ: $cfCgW[] = $E1PcT[$xEu2g]; goto bL90C; TUXMK: } goto oB_ZX; pzkVo: } }