Beispiel #1
0
        public static PhpArray GetClassInterfaces(DTypeDesc caller, object classNameOrObject, bool useAutoload)
        {
            ScriptContext context = ScriptContext.CurrentContext;

            DTypeDesc type = ClassNameOrObjectToType(context, null, caller, classNameOrObject, useAutoload);

            if (type == null)
            {
                return(null);
            }

            PhpArray result = new PhpArray();

            DTypeDesc[] interfaces = type.GetImplementedInterfaces();
            for (int i = 0; i < interfaces.Length; i++)
            {
                string iface_name = interfaces[i].MakeFullName();
                result[iface_name] = iface_name;
            }

            return(result);
        }