<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Vendor\Util; use ModStart\Core\Exception\BizException; use ModStart\Core\Util\TreeUtil; class FilterUtil { private static function categoryGet($VM7cz, $gZ39D) { foreach ($VM7cz as $BEJrC) { if ($BEJrC['id'] == $gZ39D) { return $BEJrC; } } return null; } public static function categoryTreeFilter($I0Hpe, $VM7cz, $Vvxge = 'title', $cWnL1 = 'pid') { goto W3zy2; RomsK: if ($I0Hpe) { goto YRHrv; FNZ8b: $Dbl25[] = $BEJrC[$Vvxge]; goto OVQas; OVQas: $lqr_d[] = $BEJrC[$Vvxge]; goto D9K_y; D9K_y: if ($BEJrC[$cWnL1]) { $i8jPd = self::categoryGet($VM7cz, $BEJrC[$cWnL1]); $lqr_d[] = $i8jPd[$Vvxge]; } goto TCHZk; YRHrv: $BEJrC = self::categoryGet($VM7cz, $I0Hpe); goto SGE8L; SGE8L: BizException::throwsIfEmpty('分类不存在', $BEJrC); goto FNZ8b; TCHZk: } goto IjVav; W3zy2: $Dbl25 = array(); goto BvZov; as6zF: $lEokb = TreeUtil::nodesChainWithItems($VM7cz, $I0Hpe); goto vD9kD; GV6aW: $mVZ4N = TreeUtil::nodesChildrenIds($VM7cz, $I0Hpe); goto j8eAj; BvZov: $lqr_d = array(); goto xldAG; IjVav: $gRB_N = array($I0Hpe); goto GV6aW; xldAG: $BEJrC = null; goto RomsK; vD9kD: return array($BEJrC, $gRB_N, $lEokb, $Dbl25, $lqr_d); goto q9Q1O; j8eAj: $gRB_N = array_merge($gRB_N, $mVZ4N); goto as6zF; q9Q1O: } }