<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Vendor\Admin\Config; class AdminWidgetLink { private static $list = array(); public static function register($jqce9) { self::$list[] = $jqce9; } public static function get() { goto XWmiU; NrKsc: foreach ($Kj1iv as $QBy8K => $cG5OI) { if (isset($veuPj[$cG5OI['title']])) { $veuPj[$cG5OI['title']]['list'] = array_merge($veuPj[$cG5OI['title']]['list'], $cG5OI['list']); } else { $veuPj[$cG5OI['title']] = $cG5OI; } } goto IU39L; IU39L: return array_values($veuPj); goto y_h8Y; O0r4i: foreach (self::$list as $lDvaK) { if ($lDvaK instanceof \Closure) { $MZSQT = call_user_func($lDvaK); if (!empty($MZSQT)) { if (isset($MZSQT['title']) && isset($MZSQT['list'])) { $Kj1iv[] = $MZSQT; } else { $Kj1iv = array_merge($Kj1iv, $MZSQT); } } } else { $Kj1iv[] = $lDvaK; } } goto Vsjuy; Vsjuy: $veuPj = array(); goto NrKsc; XWmiU: $Kj1iv = array(); goto O0r4i; y_h8Y: } public static function build($VXJ0s, $SAWK1) { if (empty($SAWK1)) { return null; } return array('title' => $VXJ0s, 'list' => array_filter(array_map(function ($lDvaK) { return $lDvaK ? array('title' => $lDvaK[0], 'link' => $lDvaK[1]) : null; }, $SAWK1))); } }