Ejemplo n.º 1
0
        internal static PhpSQLiteDbConnection ValidConnection(PhpResource handle)
        {
            PhpSQLiteDbConnection connection;

            if (handle != null && handle.GetType() == typeof(PhpSQLiteDbConnection))
                connection = (PhpSQLiteDbConnection)handle;
            else
                connection = null;

            if (connection != null && connection.IsValid)
                return connection;

            PhpException.Throw(PhpError.Warning, LibResources.GetString("invalid_connection_resource"));
            return null;
        }
Ejemplo n.º 2
0
        internal static XmlParserResource ValidResource(PhpResource handle)
        {
            if (handle != null && handle.GetType() == typeof(XmlParserResource))
                return (XmlParserResource)handle;

            PhpException.Throw(PhpError.Warning, Strings.invalid_xmlresource);
            return null;
        }