/// <summary> /// Called by the Core after the library is loaded. /// </summary> protected override void Loaded(PhpLibraryAttribute assemblyAttribute, LibraryConfigStore configStore) { base.Loaded(assemblyAttribute, configStore); singleton = this; PDOSQLiteConfiguration.RegisterLegacyOptions(); PDOLibraryDescriptor.RegisterProvider(new SQLitePDODriver()); var tPDO = Core.Reflection.DTypeDesc.Create(typeof(PDO)); PhpMemberAttributes att = PhpMemberAttributes.Public | PhpMemberAttributes.Static; ApplicationContext.Default.AddMethodToType(tPDO, att, "sqliteCreateFunction", SQLitePDODriver.PDO_sqliteCreateFunction); }
/// <summary> /// Called by the Core after the library is loaded. /// </summary> protected override void Loaded(PhpLibraryAttribute assemblyAttribute, LibraryConfigStore configStore) { base.Loaded(assemblyAttribute, configStore); singleton = this; PDOSQLiteConfiguration.RegisterLegacyOptions(); PDOLibraryDescriptor.RegisterProvider(new SQLitePDODriver()); string fullname = typeof(PDO).Name; DType tPDO = ApplicationContext.Default.GetType(new QualifiedName(new Name(typeof(PDO).FullName)), ref fullname); Core.Reflection.PhpMemberAttributes att = Core.Reflection.PhpMemberAttributes.Public | Core.Reflection.PhpMemberAttributes.Static; ApplicationContext.Default.AddMethodToType(tPDO.TypeDesc, att, "sqliteCreateFunction", SQLitePDODriver.PDO_sqliteCreateFunction); }