/// <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;

            PDOSQLServerConfiguration.RegisterLegacyOptions();

            PDOLibraryDescriptor.RegisterProvider(new SQLServerPDODriver());

            var tPDO = Core.Reflection.DTypeDesc.Create(typeof(PDO));
            PhpMemberAttributes att = PhpMemberAttributes.Public | PhpMemberAttributes.Static;
            //ApplicationContext.Default.AddMethodToType(tPDO, att, "sqliteCreateFunction", SQLServerPDODriver.PDO_sqliteCreateFunction);
            ApplicationContext.Default.AddConstantToType(tPDO, att, "SQLSRV_TXN_READ_UNCOMMITTED", SQLServerPDODriver.SQLSRV_TXN_READ_UNCOMMITTED);
        }
        /// <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;

            PDOSQLServerConfiguration.RegisterLegacyOptions();

            PDOLibraryDescriptor.RegisterProvider(new SQLServerPDODriver());

            var tPDO = Core.Reflection.DTypeDesc.Create(typeof(PDO));
            PhpMemberAttributes att = PhpMemberAttributes.Public | PhpMemberAttributes.Static;

            //ApplicationContext.Default.AddMethodToType(tPDO, att, "sqliteCreateFunction", SQLServerPDODriver.PDO_sqliteCreateFunction);
            ApplicationContext.Default.AddConstantToType(tPDO, att, "SQLSRV_TXN_READ_UNCOMMITTED", SQLServerPDODriver.SQLSRV_TXN_READ_UNCOMMITTED);
        }
        /// <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;

            PDOSQLServerConfiguration.RegisterLegacyOptions();

            PDOLibraryDescriptor.RegisterProvider(new SQLServerPDODriver());

            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", SQLServerPDODriver.PDO_sqliteCreateFunction);

            ApplicationContext.Default.AddConstantToType(tPDO.TypeDesc, att, "SQLSRV_TXN_READ_UNCOMMITTED", SQLServerPDODriver.SQLSRV_TXN_READ_UNCOMMITTED);
        }
示例#4
0
        /// <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;

            PDOSQLServerConfiguration.RegisterLegacyOptions();

            PDOLibraryDescriptor.RegisterProvider(new SQLServerPDODriver());

            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", SQLServerPDODriver.PDO_sqliteCreateFunction);

            ApplicationContext.Default.AddConstantToType(tPDO.TypeDesc, att, "SQLSRV_TXN_READ_UNCOMMITTED", SQLServerPDODriver.SQLSRV_TXN_READ_UNCOMMITTED);
        }