<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Vendor\Biz; trait BizTrait { private static $list = array(); public static function register($X1NGK) { self::$list[] = $X1NGK; } public static function registerAll(...$AQG4G) { foreach ($AQG4G as $X1NGK) { self::register($X1NGK); } } public static function listAll() { foreach (self::$list as $ynzcc => $nfRLq) { if ($nfRLq instanceof \Closure) { self::$list[$ynzcc] = call_user_func($nfRLq); } else { if (is_string($nfRLq)) { self::$list[$ynzcc] = app($nfRLq); } } } return self::$list; } private static function getByName($TTiWe) { foreach (self::all() as $kHxHl) { if ($kHxHl->name() == $TTiWe) { return $kHxHl; } } return null; } public static function allMap() { return array_build(self::all(), function ($ynzcc, $nfRLq) { return array($nfRLq->name(), $nfRLq->title()); }); } }