<?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($kHDkQ) { self::$instances[] = $kHDkQ; } public static function all() { foreach (self::$instances as $D5qRP => $qGgGl) { if ($qGgGl instanceof \Closure) { self::$instances[$D5qRP] = call_user_func($qGgGl); } else { if (is_string($qGgGl)) { self::$instances[$D5qRP] = app($qGgGl); } } } return self::$instances; } public static function getByName($aVT3z) { foreach (self::all() as $CGEHS) { if ($CGEHS->name() == $aVT3z) { return $CGEHS; } } return null; } }