<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Vendor\Util; use ModStart\Core\Exception\BizException; use ModStart\Core\Util\TreeUtil; class FilterUtil { private static function categoryGet($VrSDP, $MkmbZ) { foreach ($VrSDP as $aCqo2) { if ($aCqo2['id'] == $MkmbZ) { return $aCqo2; } } return null; } public static function categoryTreeFilter($PQi13, $VrSDP, $e11HO = 'title', $xBlhJ = 'pid') { goto eLwuG; wxZEf: $XuWDC = array($PQi13); goto qcZlf; z1WuO: $XuWDC = array_merge($XuWDC, $xIVWJ); goto YuHCA; YuHCA: $c6_xJ = TreeUtil::nodesChainWithItems($VrSDP, $PQi13); goto EcdRN; yPrno: $aXgwy = array(); goto QXsez; R2LjA: if ($PQi13) { goto JeSES; QlqZU: if ($aCqo2[$xBlhJ]) { $kDlVr = self::categoryGet($VrSDP, $aCqo2[$xBlhJ]); $aXgwy[] = $kDlVr[$e11HO]; } goto mFp2I; uTZnz: BizException::throwsIfEmpty('分类不存在', $aCqo2); goto P1Y6B; P1Y6B: $UhG2w[] = $aCqo2[$e11HO]; goto WR6W1; JeSES: $aCqo2 = self::categoryGet($VrSDP, $PQi13); goto uTZnz; WR6W1: $aXgwy[] = $aCqo2[$e11HO]; goto QlqZU; mFp2I: } goto wxZEf; qcZlf: $xIVWJ = TreeUtil::nodesChildrenIds($VrSDP, $PQi13); goto z1WuO; QXsez: $aCqo2 = null; goto R2LjA; eLwuG: $UhG2w = array(); goto yPrno; EcdRN: return array($aCqo2, $XuWDC, $c6_xJ, $UhG2w, $aXgwy); goto UJb_W; UJb_W: } }