<?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($oMd7I) { self::$instances[] = $oMd7I; } public static function all() { foreach (self::$instances as $kEhTf => $y2Ltn) { if ($y2Ltn instanceof \Closure) { self::$instances[$kEhTf] = call_user_func($y2Ltn); } else { if (is_string($y2Ltn)) { self::$instances[$kEhTf] = app($y2Ltn); } } } return self::$instances; } public static function getByName($L1N0l) { foreach (self::all() as $ZO8gl) { if ($ZO8gl->name() == $L1N0l) { return $ZO8gl; } } return null; } }