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