<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace Module\Vendor\Provider\RichContent; use Module\Vendor\Provider\RichContent\AbstractRichContentProvider; use Module\Vendor\Provider\RichContent\UEditorRichContentProvider; class RichContentProvider { private static $instances = array(UEditorRichContentProvider::class); public static function register($O9Vtg) { self::$instances[] = $O9Vtg; } public static function all() { foreach (self::$instances as $MFVkb => $YxV2x) { if ($YxV2x instanceof \Closure) { self::$instances[$MFVkb] = call_user_func($YxV2x); } else { if (is_string($YxV2x)) { self::$instances[$MFVkb] = app($YxV2x); } } } return self::$instances; } public static function getByName($MGY9H) { foreach (self::all() as $Osj8s) { if ($Osj8s->name() == $MGY9H) { return $Osj8s; } } return null; } }