0
如何使用php創建實現插件接口的實例,並將其保存在特定的插件目錄中。PHP插件加載器,它在特定目錄中創建插件的實例,以及哪些插件接口
我沒有在C#中類似的東西
Assembly assembly = Assembly.LoadFrom(pFileName);
foreach (Type type in assembly.GetTypes()){
if (type.IsPublic){
if (!type.IsAbstract){
Type typeInterface = type.GetInterface(pTypeInterface.ToString(), true);
if (typeInterface != null){
try{
object plugin = Activator.CreateInstance(pluginInterfaceType);
有沒有辦法在PHP翻譯呢?
什麼是最簡單和最安全的方法來實現這一點?
問候