<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Vendor\Admin\Config; class AdminWidgetLink { private static $list = array(); public static function register($k4EkJ) { self::$list[] = $k4EkJ; } public static function get() { goto Zk965; WXPHv: return array_values($GmeBP); goto I7YhF; fP_3x: foreach (self::$list as $MNZ1i) { if ($MNZ1i instanceof \Closure) { $seqlj = call_user_func($MNZ1i); if (!empty($seqlj)) { if (isset($seqlj['title']) && isset($seqlj['list'])) { $KAKaW[] = $seqlj; } else { $KAKaW = array_merge($KAKaW, $seqlj); } } } else { $KAKaW[] = $MNZ1i; } } goto uIPP1; nQHM0: foreach ($KAKaW as $F4wee => $SxG_W) { if (isset($GmeBP[$SxG_W['title']])) { $GmeBP[$SxG_W['title']]['list'] = array_merge($GmeBP[$SxG_W['title']]['list'], $SxG_W['list']); } else { $GmeBP[$SxG_W['title']] = $SxG_W; } } goto WXPHv; uIPP1: $GmeBP = array(); goto nQHM0; Zk965: $KAKaW = array(); goto fP_3x; I7YhF: } public static function build($zLycW, $k1NHq) { if (empty($k1NHq)) { return null; } return array('title' => $zLycW, 'list' => array_filter(array_map(function ($MNZ1i) { return $MNZ1i ? array('title' => $MNZ1i[0], 'link' => $MNZ1i[1]) : null; }, $k1NHq))); } }