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