<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Vendor\Admin\Config; class AdminWidgetLink { private static $list = array(); public static function register($x9F2U) { self::$list[] = $x9F2U; } public static function get() { goto O3X8H; MigHy: 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 UEwQF; iR1v9: 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 AfCrK; UEwQF: $y4YPy = array(); goto iR1v9; AfCrK: return array_values($y4YPy); goto wLjn7; O3X8H: $CRNa9 = array(); goto MigHy; wLjn7: } 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))); } }