<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Vendor\Admin\Widget; class AdminWidgetLink { private static $list = array(); public static function register($x9F2U) { self::$list[] = $x9F2U; } public static function get() { goto Do7hC; gG_tR: $y4YPy = array(); goto xsC5y; Do7hC: $CRNa9 = array(); goto Y88w0; xsC5y: foreach ($CRNa9 as $d2HEV => $hf0nR) { if (isset($y4YPy[$hf0nR['title']])) { $y4YPy[$hf0nR['title']]['list'] = array_merge($y4YPy[$hf0nR['title']]['list'], $hf0nR['list']); } else { $y4YPy[$hf0nR['title']] = $hf0nR; } } goto lCSr3; Y88w0: foreach (self::$list as $zEBpl) { if ($zEBpl instanceof \Closure) { $sqdZL = call_user_func($zEBpl); if (!empty($sqdZL)) { if (isset($sqdZL['title']) && isset($sqdZL['list'])) { $CRNa9[] = $sqdZL; } else { $CRNa9 = array_merge($CRNa9, $sqdZL); } } } else { $CRNa9[] = $zEBpl; } } goto gG_tR; lCSr3: return array_values($y4YPy); goto borHo; borHo: } public static function build($jCU2b, $ZPyfc) { if (empty($ZPyfc)) { return null; } return array('title' => $jCU2b, 'list' => array_filter(array_map(function ($zEBpl) { return $zEBpl ? array('title' => $zEBpl[0], 'link' => $zEBpl[1]) : null; }, $ZPyfc))); } }