<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Vendor\Admin\Widget; class AdminWidgetLink { private static $list = array(); public static function register($OukAb) { self::$list[] = $OukAb; } public static function get() { goto tNM91; nSJBp: foreach ($QCW2U as $JdFJR => $PSYn9) { if (isset($lA8zE[$PSYn9['title']])) { $lA8zE[$PSYn9['title']]['list'] = array_merge($lA8zE[$PSYn9['title']]['list'], $PSYn9['list']); } else { $lA8zE[$PSYn9['title']] = $PSYn9; } } goto yinKK; TW6nX: $lA8zE = array(); goto nSJBp; KSV03: foreach (self::$list as $vPOhn) { if ($vPOhn instanceof \Closure) { $j3paW = call_user_func($vPOhn); if (!empty($j3paW)) { if (isset($j3paW['title']) && isset($j3paW['list'])) { $QCW2U[] = $j3paW; } else { $QCW2U = array_merge($QCW2U, $j3paW); } } } else { $QCW2U[] = $vPOhn; } } goto TW6nX; yinKK: return array_values($lA8zE); goto lR0H4; tNM91: $QCW2U = array(); goto KSV03; lR0H4: } public static function build($Hcv7z, $xQxKz) { if (empty($xQxKz)) { return null; } return array('title' => $Hcv7z, 'list' => array_filter(array_map(function ($vPOhn) { return $vPOhn ? array('title' => $vPOhn[0], 'link' => $vPOhn[1]) : null; }, $xQxKz))); } }