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