<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Vendor\Admin\Widget; class AdminWidgetLink { private static $list = array(); public static function register($gFSnq) { self::$list[] = $gFSnq; } public static function get() { goto gon0b; SaMRU: foreach ($H_aKg as $D5qRP => $qGgGl) { if (isset($v3DZL[$qGgGl['title']])) { $v3DZL[$qGgGl['title']]['list'] = array_merge($v3DZL[$qGgGl['title']]['list'], $qGgGl['list']); } else { $v3DZL[$qGgGl['title']] = $qGgGl; } } goto LAbpw; XiW5t: foreach (self::$list as $FSL7c) { if ($FSL7c instanceof \Closure) { $e3gsP = call_user_func($FSL7c); if (!empty($e3gsP)) { if (isset($e3gsP['title']) && isset($e3gsP['list'])) { $H_aKg[] = $e3gsP; } else { $H_aKg = array_merge($H_aKg, $e3gsP); } } } else { $H_aKg[] = $FSL7c; } } goto O71Pw; gon0b: $H_aKg = array(); goto XiW5t; LAbpw: return array_values($v3DZL); goto hOX5V; O71Pw: $v3DZL = array(); goto SaMRU; hOX5V: } public static function build($MDAKw, $xUvSq) { if (empty($xUvSq)) { return null; } return array('title' => $MDAKw, 'list' => array_filter(array_map(function ($FSL7c) { return $FSL7c ? array('title' => $FSL7c[0], 'link' => $FSL7c[1]) : null; }, $xUvSq))); } }