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