/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.19
 * 
 * This file is not intended to be easily readable and contains a number of 
 * coding conventions designed to improve portability and efficiency. Do not make
 * changes to this file unless you know what you are doing--modify the SWIG 
 * interface file instead. 
 * ----------------------------------------------------------------------------- */


#ifdef __cplusplus
template<class T> class SwigValueWrapper {
    T *tt;
public:
    inline SwigValueWrapper() : tt(0) { }
    inline ~SwigValueWrapper() { if (tt) delete tt; } 
    inline SwigValueWrapper& operator=(const T& t) { tt = new T(t); return *this; }
    inline operator T&() const { return *tt; }
    inline T *operator&() { return tt; }
};                                                    
#endif

/***********************************************************************
 * common.swg
 *
 *     This file contains generic SWIG runtime support for pointer
 *     type checking as well as a few commonly used macros to control
 *     external linkage.
 *
 * Author : David Beazley (beazley@cs.uchicago.edu)
 *
 * Copyright (c) 1999-2000, The University of Chicago
 * 
 * This file may be freely redistributed without license or fee provided
 * this copyright message remains intact.
 ************************************************************************/

#include <string.h>

#if defined(_WIN32) || defined(__WIN32__)
#       if defined(_MSC_VER)
#               if defined(STATIC_LINKED)
#                       define SWIGEXPORT(a) a
#                       define SWIGIMPORT(a) extern a
#               else
#                       define SWIGEXPORT(a) __declspec(dllexport) a
#                       define SWIGIMPORT(a) extern a
#               endif
#       else
#               if defined(__BORLANDC__)
#                       define SWIGEXPORT(a) a _export
#                       define SWIGIMPORT(a) a _export
#               else
#                       define SWIGEXPORT(a) a
#                       define SWIGIMPORT(a) a
#               endif
#       endif
#else
#       define SWIGEXPORT(a) a
#       define SWIGIMPORT(a) a
#endif

#ifdef SWIG_GLOBAL
#define SWIGRUNTIME(a) SWIGEXPORT(a)
#else
#define SWIGRUNTIME(a) static a
#endif

#ifdef __cplusplus
extern "C" {
#endif

typedef void *(*swig_converter_func)(void *);
typedef struct swig_type_info *(*swig_dycast_func)(void **);

typedef struct swig_type_info {
  const char             *name;                 
  swig_converter_func     converter;
  const char             *str;
  void                   *clientdata;	
  swig_dycast_func        dcast;
  struct swig_type_info  *next;
  struct swig_type_info  *prev;
} swig_type_info;

#ifdef SWIG_NOINCLUDE

SWIGIMPORT(swig_type_info *) SWIG_TypeRegister(swig_type_info *);
SWIGIMPORT(swig_type_info *) SWIG_TypeCheck(char *c, swig_type_info *);
SWIGIMPORT(void *)           SWIG_TypeCast(swig_type_info *, void *);
SWIGIMPORT(swig_type_info *) SWIG_TypeDynamicCast(swig_type_info *, void **);
SWIGIMPORT(const char *)     SWIG_TypeName(const swig_type_info *);
SWIGIMPORT(swig_type_info *) SWIG_TypeQuery(const char *);
SWIGIMPORT(void)             SWIG_TypeClientData(swig_type_info *, void *);

#else

static swig_type_info *swig_type_list = 0;

/* Register a type mapping with the type-checking */
SWIGRUNTIME(swig_type_info *)
SWIG_TypeRegister(swig_type_info *ti)
{
  swig_type_info *tc, *head, *ret, *next;
  /* Check to see if this type has already been registered */
  tc = swig_type_list;
  while (tc) {
    if (strcmp(tc->name, ti->name) == 0) {
      /* Already exists in the table.  Just add additional types to the list */
      if (tc->clientdata) ti->clientdata = tc->clientdata;	
      head = tc;
      next = tc->next;
      goto l1;
    }
    tc = tc->prev;
  }
  head = ti;
  next = 0;

  /* Place in list */
  ti->prev = swig_type_list;
  swig_type_list = ti;

  /* Build linked lists */
 l1:
  ret = head;
  tc = ti + 1;
  /* Patch up the rest of the links */
  while (tc->name) {
    head->next = tc;
    tc->prev = head;
    head = tc;
    tc++;
  }
  if (next) next->prev = head;  /**/
  head->next = next;
  return ret;
}

/* Check the typename */
SWIGRUNTIME(swig_type_info *) 
SWIG_TypeCheck(char *c, swig_type_info *ty)
{
  swig_type_info *s;
  if (!ty) return 0;        /* Void pointer */
  s = ty->next;             /* First element always just a name */
  do {
    if (strcmp(s->name,c) == 0) {
      if (s == ty->next) return s;
      /* Move s to the top of the linked list */
      s->prev->next = s->next;
      if (s->next) {
	s->next->prev = s->prev;
      }
      /* Insert s as second element in the list */
      s->next = ty->next;
      if (ty->next) ty->next->prev = s;
      ty->next = s;
      s->prev = ty;  /**/
      return s;
    }
    s = s->next;
  } while (s && (s != ty->next));
  return 0;
}

/* Cast a pointer up an inheritance hierarchy */
SWIGRUNTIME(void *) 
SWIG_TypeCast(swig_type_info *ty, void *ptr) 
{
  if ((!ty) || (!ty->converter)) return ptr;
  return (*ty->converter)(ptr);
}

/* Dynamic pointer casting. Down an inheritance hierarchy */
SWIGRUNTIME(swig_type_info *) 
SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) 
{
  swig_type_info *lastty = ty;
  if (!ty || !ty->dcast) return ty;
  while (ty && (ty->dcast)) {
     ty = (*ty->dcast)(ptr);
     if (ty) lastty = ty;
  }
  return lastty;
}

/* Return the name associated with this type */
SWIGRUNTIME(const char *)
SWIG_TypeName(const swig_type_info *ty) {
  return ty->name;
}

/* Search for a swig_type_info structure */
SWIGRUNTIME(swig_type_info *)
SWIG_TypeQuery(const char *name) {
  swig_type_info *ty = swig_type_list;
  while (ty) {
    if (ty->str && (strcmp(name,ty->str) == 0)) return ty;
    if (ty->name && (strcmp(name,ty->name) == 0)) return ty;
    ty = ty->prev;
  }
  return 0;
}

/* Set the clientdata field for a type */
SWIGRUNTIME(void)
SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
  swig_type_info *tc, *equiv;
  if (ti->clientdata == clientdata) return;
  ti->clientdata = clientdata;
  equiv = ti->next;
  while (equiv) {
    if (!equiv->converter) {
      tc = swig_type_list;
      while (tc) {
	if ((strcmp(tc->name, equiv->name) == 0))
	  SWIG_TypeClientData(tc,clientdata);
	tc = tc->prev;
      }
    }
    equiv = equiv->next;
  }
}
#endif

#ifdef __cplusplus
}

#endif

/*
 * php4.swg
 *
 * PHP4 runtime library
 *
 */

#ifdef __cplusplus
extern "C" {
#endif
#include "zend.h"
#include "zend_API.h"
#include "php.h"

/* These TSRMLS_ stuff should already be defined now, but with older php under
   redhat are not... */
#ifndef TSRMLS_D
#define TSRMLS_D
#endif
#ifndef TSRMLS_DC
#define TSRMLS_DC
#endif
#ifndef TSRMLS_C
#define TSRMLS_C
#endif
#ifndef TSRMLS_CC
#define TSRMLS_CC
#endif

#ifdef __cplusplus
}
#endif

/* used to wrap returned objects in so we know whether they are newobject
   and need freeing, or not */
typedef struct _swig_object_wrapper {
  void * ptr;
  int newobject;
} swig_object_wrapper;

/* local scope self_constructors are set to 1 inside function wrappers
   which are also class constructors, so that the php4.swg output typemaps
   know whether or not to wrap returned objects in this_ptr or a new object */
int self_constructor=0;

/* empty zend destructor for types without one */
static ZEND_RSRC_DTOR_FUNC(SWIG_landfill) {};

/* This one makes old swig style string pointers but the php module doesn't
   use these any more.  This is just left here for old times sake and may go */
SWIGRUNTIME(void)
SWIG_MakePtr(char *c, void *ptr, swig_type_info *ty) {
  static char hex[17] = "0123456789abcdef";
  unsigned long p, s;
  char data[32], *r;

  r = data;
  p = (unsigned long) ptr;
  if (p > 0) {
    while (p > 0) {
      s = p & 0xf;
      *(r++) = hex[s];
      p = p >> 4;
    }
    *r = '_';
    while (r >= data) {
      *(c++) = *(r--);
    }
    strcpy (c, ty->name);
  } else {
    strcpy (c, "NULL");
  }
}

SWIGRUNTIME(void)
SWIG_SetPointerChar(char **c, void *ptr, swig_type_info *type) {
   char data[512];

   SWIG_MakePtr(data, ptr, type);
   *c = estrdup(data);
}

#define SWIG_SetPointerZval(a,b,c,d) SWIG_ZTS_SetPointerZval(a,b,c,d, SWIG_module_entry TSRMLS_CC)

SWIGRUNTIME(void)
SWIG_ZTS_SetPointerZval(zval *z, void *ptr, swig_type_info *type, int newobject, zend_module_entry* module_entry TSRMLS_DC) {
  swig_object_wrapper *value=NULL;
  /* No need to call SWIG_MakePtr here! */
  if (type->clientdata) {
    if (! (*(int *)(type->clientdata))) zend_error(E_ERROR, "Type: %s failed to register with zend",type->name);
    value=(swig_object_wrapper *)emalloc(sizeof(swig_object_wrapper));
    value->ptr=ptr;
    value->newobject=newobject;
    ZEND_REGISTER_RESOURCE(z, value, *(int *)(type->clientdata));
    return;
  } else { /* have to deal with old fashioned string pointer?
              but this should not get this far */
    zend_error(E_ERROR, "Type: %s not registered with zend",type->name);
  }
}

/* This old-style routine converts an old string-pointer c into a real pointer
   ptr calling making appropriate casting functions according to ty
   We don't use this any more */
SWIGRUNTIME(int)
_SWIG_ConvertPtr(char *c, void **ptr, swig_type_info *ty) {
   register int d;
   unsigned long p;
   swig_type_info *tc;

   if(c == NULL) {
   	*ptr = 0;
	return 0;
   }

   p = 0;
   if (*c != '_') {
    *ptr = (void *) 0;
    if (strcmp(c,"NULL") == 0) {
	return 0;
    } else {
	goto type_error;
    }
  }

    c++;
    /* Extract hex value from pointer */
    while ((d = *c)) {
      if ((d >= '0') && (d <= '9'))
        p = (p << 4) + (d - '0');
      else if ((d >= 'a') && (d <= 'f'))
        p = (p << 4) + (d - ('a'-10));
      else
        break;
      c++;
    }
    *ptr = (void *) p;
	
    if(ty) {
	tc = SWIG_TypeCheck(c,ty);
	if(!tc) goto type_error;
	*ptr = SWIG_TypeCast(tc, (void*)p);
    }
    return 0;

type_error:

    return -1;
}

/* This is a new pointer conversion routine
   Taking the native pointer p (which would have been converted from the old
   string pointer) and it's php type id, and it's type name (which also would
   have come from the old string pointer) it converts it to ptr calling 
   appropriate casting functions according to ty
   Sadly PHP has no API to find a type name from a type id, only from an instance
   of a resource of the type id, so we have to pass type_name as well.
   The two functions which might call this are:
   SWIG_ZTS_ConvertResourcePtr which gets the type name from the resource
   and the registered zend destructors for which we have one per type each
   with the type name hard wired in. */
SWIGRUNTIME(int)
SWIG_ZTS_ConvertResourceData(void * p, int type, const char *type_name, void **ptr, swig_type_info *ty TSRMLS_DC) {
  swig_type_info *tc;

  if (ty) {
    if (! type_name) {  
      /* can't convert p to ptr type ty if we don't know what type p is */
      return -1;
    } else {
      /* convert and cast p from type_name to ptr as ty
         Need to sort out const-ness, can SWIG_TypeCast really not take a const? */
      tc = SWIG_TypeCheck((char *)type_name,ty);
      if (!tc) return -1;
      *ptr = SWIG_TypeCast(tc, (void*)p);
    }
  } else {
    /* They don't care about the target type, so just pass on the pointer! */
    *ptr = (void *) p;
  }
  return 0;
}

/* This function fills ptr with a pointer of type ty by extracting the pointer
   and type info from the resource in z.  z must be a resource
   It uses SWIG_ZTS_ConvertResourceData to do the real work. */
SWIGRUNTIME(int)
SWIG_ZTS_ConvertResourcePtr(zval *z, void **ptr, swig_type_info *ty TSRMLS_DC) {
  swig_object_wrapper *value;
  void *p;
  int type;
  char *type_name;

  value = (swig_object_wrapper *) zend_list_find(z->value.lval,&type);
  p = value->ptr;
  if (type==-1) return -1;

  type_name=zend_rsrc_list_get_rsrc_type(z->value.lval);

  return SWIG_ZTS_ConvertResourceData(p,type,type_name,ptr,ty TSRMLS_CC);
}

/* But in fact SWIG_ConvertPtr is the native interface for getting typed
   pointer values out of zvals.  We need the TSRMLS_ macros for when we
   make PHP type calls later as we handle php resources */
#define SWIG_ConvertPtr(a,b,c) SWIG_ZTS_ConvertPtr(a,b,c TSRMLS_CC)

/* We allow passing of a STRING or RESOURCE pointing to the object
   or an OBJECT whose _cPtr is a string or resource pointing to the object
   STRING pointers are very depracated */
SWIGRUNTIME(int)
SWIG_ZTS_ConvertPtr(zval *z, void **ptr, swig_type_info *ty TSRMLS_DC) {
   char *c;
   zval *val;
   
   if(z == NULL) {
	*ptr = 0;
	return 0;
   }

   if (z->type==IS_OBJECT) {
     zval ** _cPtr;
     if (zend_hash_find(HASH_OF(z),"_cPtr",sizeof("_cPtr"),(void**)&_cPtr)==SUCCESS) {
       /* Don't co-erce to string if it isn't */
       if ((*_cPtr)->type==IS_STRING) c = Z_STRVAL_PP(_cPtr);
       else if ((*_cPtr)->type==IS_RESOURCE) {
         return SWIG_ZTS_ConvertResourcePtr(*_cPtr,ptr,ty TSRMLS_CC);
       } else goto type_error; /* _cPtr was not string or resource property */
     } else goto type_error; /* can't find property _cPtr */
   } else if (z->type==IS_RESOURCE) {
     return SWIG_ZTS_ConvertResourcePtr(z,ptr,ty TSRMLS_CC);
   } else if (z->type==IS_STRING) {
     c = Z_STRVAL_P(z); 
     return _SWIG_ConvertPtr(c,ptr,ty);
   } else goto type_error;

type_error:

    return -1;
}


/* -------- TYPES TABLE (BEGIN) -------- */

#define  SWIGTYPE_p_XmlResults swig_types[0] 
#define  SWIGTYPE_p_XmlQueryContext swig_types[1] 
#define  SWIGTYPE_p_XmlUpdateContext swig_types[2] 
#define  SWIGTYPE_p_XmlIndexSpecification swig_types[3] 
#define  SWIGTYPE_p_u_int32_t swig_types[4] 
#define  SWIGTYPE_p_XmlValue swig_types[5] 
#define  SWIGTYPE_p_char swig_types[6] 
#define  SWIGTYPE_p_XmlQueryExpression swig_types[7] 
#define  SWIGTYPE_p_DbTxn swig_types[8] 
#define  SWIGTYPE_p_XmlContainer swig_types[9] 
#define  SWIGTYPE_p_DbEnv swig_types[10] 
#define  SWIGTYPE_p_XmlModify swig_types[11] 
#define  SWIGTYPE_p_XmlDocument swig_types[12] 
#define  SWIGTYPE_int swig_types[13] 
#define  SWIGTYPE_p_int swig_types[14] 
#define  SWIGTYPE_p_db_timeout_t swig_types[15] 
#define  SWIGTYPE_p_XmlIndexDeclaration swig_types[16] 
static swig_type_info *swig_types[18];

/* -------- TYPES TABLE (END) -------- */

/* header section */
/*
  +----------------------------------------------------------------------+
  | PHP version 4.0                                                      |
  +----------------------------------------------------------------------+
  | Copyright (c) 1997, 1998, 1999, 2000, 2001 The PHP Group             |
  +----------------------------------------------------------------------+
  | This source file is subject to version 2.02 of the PHP license,      |
  | that is bundled with this package in the file LICENSE, and is        |
  | available at through the world-wide-web at                           |
  | http://www.php.net/license/2_02.txt.                                 |
  | If you did not receive a copy of the PHP license and are unable to   |
  | obtain it through the world-wide-web, please send a note to          |
  | license@php.net so we can mail you a copy immediately.               |
  +----------------------------------------------------------------------+
  | Authors:                                                             |
  |                                                                      |
  +----------------------------------------------------------------------+
 */
#define SWIG_init	initdbxml_php4

#define SWIG_name	"dbxml_php4"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#ifdef __cplusplus
extern "C" {
#endif
#include "php.h"
#include "php_ini.h"
#include "ext/standard/info.h"
#include "php_dbxml_php4.h"
#ifdef __cplusplus
}
#endif


#define  SWIG_MemoryError    1
#define  SWIG_IOError        2
#define  SWIG_RuntimeError   3
#define  SWIG_IndexError     4
#define  SWIG_TypeError      5
#define  SWIG_DivisionByZero 6
#define  SWIG_OverflowError  7
#define  SWIG_SyntaxError    8
#define  SWIG_ValueError     9
#define  SWIG_SystemError   10
#define  SWIG_UnknownError  99


/* We should make use of "code" if we can */
#define SWIG_exception(code, msg) { zend_error(E_ERROR, msg); }


#include "db_cxx.h"
#include "dbxml/DbXml.hpp"
#include <errno.h>
#include <fstream>

using namespace DbXml;

class XmlIndexDeclaration {
public:
	XmlIndexDeclaration() {}
	XmlIndexDeclaration(const std::string &uri, const std::string &name, const std::string &index) : uri(uri), name(name), index(index) {}

	std::string uri, name, index;
};


#include <string>

static int _wrap_propset_DbTxn(zend_property_reference *property_reference, pval *value);
static int _propset_DbTxn(zend_property_reference *property_reference, pval *value);
static pval _wrap_propget_DbTxn(zend_property_reference *property_reference);
static int _propget_DbTxn(zend_property_reference *property_reference, pval *value);
static DbTxn *DbEnv_txn_begin(DbEnv *self,DbTxn *pid,u_int32_t flags){
		DbTxn *txn;
		self->txn_begin(pid, &txn, flags);
		return txn;
	}
static int _wrap_propset_DbEnv(zend_property_reference *property_reference, pval *value);
static int _propset_DbEnv(zend_property_reference *property_reference, pval *value);
static pval _wrap_propget_DbEnv(zend_property_reference *property_reference);
static int _propget_DbEnv(zend_property_reference *property_reference, pval *value);
static XmlIndexSpecification *XmlContainer_getIndexSpecification(XmlContainer const *self,DbTxn *txn){
		return new XmlIndexSpecification(self->getIndexSpecification(txn));
	}
static XmlDocument *XmlContainer_getDocument(XmlContainer *self,DbTxn *txn,u_int32_t id,u_int32_t flags){
		return new XmlDocument(self->getDocument(txn, id, flags));
	}
static XmlQueryExpression *XmlContainer_parseXPathExpression(XmlContainer const *self,DbTxn *txn,std::string const &query,XmlQueryContext *context){
		return new XmlQueryExpression(self->parseXPathExpression(txn, query, context));
	}
static XmlResults *XmlContainer_queryWithXPath(XmlContainer const *self,DbTxn *txn,std::string const &query,XmlQueryContext *context,u_int32_t flags){
		return new XmlResults(self->queryWithXPath(txn, query, context, flags));
	}
static XmlResults *XmlContainer_queryWithXPath(XmlContainer const *self,DbTxn *txn,XmlQueryExpression &query,u_int32_t flags){
		return new XmlResults(self->queryWithXPath(txn, query, flags));
	}
static u_int32_t *XmlContainer_query(XmlContainer const *self,DbTxn *txn,char const *query,XmlQueryContext *context){
		// XXX: if context != NULL, should check return type
		XmlResults results = self->queryWithXPath(txn, query, context);
		XmlValue xval;
		
		int num_vals = 0;
		while (results.next(xval))
			++num_vals;
		results.reset();
		u_int32_t *vals = new u_int32_t[num_vals + 1];
		for (int i = 0; i < num_vals; i++) {
			results.next(xval);
			vals[i] = xval.asDocument(context).getID();
		}
		vals[num_vals] = 0;
		return vals;
	}
static void XmlContainer_dump(XmlContainer *self,char const *filename,u_int32_t flags){
		std::ofstream out(filename);
		self->dump(&out, flags);
		out.close();
	}
static void XmlContainer_load(XmlContainer *self,char const *filename,u_int32_t flags){
		std::ifstream in(filename);
		unsigned long lineno = 0;
		self->load(&in, &lineno, flags);
		in.close();
	}
static void XmlContainer_verify(XmlContainer *self,char const *filename,u_int32_t flags){
		std::ofstream out;
		if (flags & DB_SALVAGE)
			out.open(filename);
		self->verify(&out, flags);
		if (flags & DB_SALVAGE)
			out.close();
	}
void XmlContainer_setLogLevel(LogLevel level,bool enabled){
		DbXml::setLogLevel(level, enabled);
	}
void XmlContainer_setLogCategory(LogCategory category,bool enabled){
		DbXml::setLogCategory(category, enabled);
	}
int XmlContainer_get_version_major(){
		int major;
		(void)dbxml_version(&major, NULL, NULL);
		return major;
	}
int XmlContainer_get_version_minor(){
		int minor;
		(void)dbxml_version(NULL, &minor, NULL);
		return minor;
	}
int XmlContainer_get_version_patch(){
		int patch;
		(void)dbxml_version(NULL, NULL, &patch);
		return patch;
	}
char const *XmlContainer_get_version_string(){
		return dbxml_version(NULL, NULL, NULL);
	}
static int _wrap_propset_XmlContainer(zend_property_reference *property_reference, pval *value);
static int _propset_XmlContainer(zend_property_reference *property_reference, pval *value);
static pval _wrap_propget_XmlContainer(zend_property_reference *property_reference);
static int _propget_XmlContainer(zend_property_reference *property_reference, pval *value);
static std::string XmlDocument_getContentAsString(XmlDocument const *self){
		std::string s;
		return self->getContentAsString(s);
	}
static XmlResults *XmlDocument_queryWithXPath(XmlDocument const *self,std::string const &query,XmlQueryContext *context){
		return new XmlResults(self->queryWithXPath(query, context));
	}
static XmlResults *XmlDocument_queryWithXPath(XmlDocument const *self,XmlQueryExpression &query){
		return new XmlResults(self->queryWithXPath(query));
	}
static int _wrap_propset_XmlDocument(zend_property_reference *property_reference, pval *value);
static int _propset_XmlDocument(zend_property_reference *property_reference, pval *value);
static pval _wrap_propget_XmlDocument(zend_property_reference *property_reference);
static int _propget_XmlDocument(zend_property_reference *property_reference, pval *value);
static XmlValue *XmlQueryContext_getVariableValue(XmlQueryContext *self,std::string const &name){
		XmlValue *value = new XmlValue;
		if (self->getVariableValue(name, *value))
			return value;
		else {
			delete value;
			return NULL;
		}
	}
static int _wrap_propset_XmlQueryContext(zend_property_reference *property_reference, pval *value);
static int _propset_XmlQueryContext(zend_property_reference *property_reference, pval *value);
static pval _wrap_propget_XmlQueryContext(zend_property_reference *property_reference);
static int _propget_XmlQueryContext(zend_property_reference *property_reference, pval *value);
static XmlValue *XmlResults_next(XmlResults *self){
		XmlValue *value = new XmlValue;
		if (self->next(*value))
			return value;
		else {
			delete value;
			return NULL;
		}
	}
static bool XmlResults_nextDocument(XmlResults *self,XmlDocument &document){
                return (self->next(document));
        }
static bool XmlResults_nextDocumentAndValue(XmlResults *self,XmlDocument &document,XmlValue &value){
                return (self->next(document, value));
        }
static int _wrap_propset_XmlResults(zend_property_reference *property_reference, pval *value);
static int _propset_XmlResults(zend_property_reference *property_reference, pval *value);
static pval _wrap_propget_XmlResults(zend_property_reference *property_reference);
static int _propget_XmlResults(zend_property_reference *property_reference, pval *value);
static int _wrap_propset_XmlUpdateContext(zend_property_reference *property_reference, pval *value);
static int _propset_XmlUpdateContext(zend_property_reference *property_reference, pval *value);
static pval _wrap_propget_XmlUpdateContext(zend_property_reference *property_reference);
static int _propget_XmlUpdateContext(zend_property_reference *property_reference, pval *value);
static int _wrap_propset_XmlValue(zend_property_reference *property_reference, pval *value);
static int _propset_XmlValue(zend_property_reference *property_reference, pval *value);
static pval _wrap_propget_XmlValue(zend_property_reference *property_reference);
static int _propget_XmlValue(zend_property_reference *property_reference, pval *value);
static XmlIndexDeclaration *XmlIndexSpecification_find(XmlIndexSpecification *self,std::string const &uri,std::string const &name){
		XmlIndexDeclaration *idecl = new XmlIndexDeclaration(uri, name, "");
		if (self->find(idecl->uri, idecl->name, idecl->index))
			return idecl;
		else {
			delete idecl;
			return NULL;
		}
	}
static XmlIndexDeclaration *XmlIndexSpecification_next(XmlIndexSpecification *self){
		XmlIndexDeclaration *idecl = new XmlIndexDeclaration;
		if (self->next(idecl->uri, idecl->name, idecl->index))
			return idecl;
		else {
			delete idecl;
			return NULL;
		}
	}
static int _wrap_propset_XmlIndexSpecification(zend_property_reference *property_reference, pval *value);
static int _propset_XmlIndexSpecification(zend_property_reference *property_reference, pval *value);
static pval _wrap_propget_XmlIndexSpecification(zend_property_reference *property_reference);
static int _propget_XmlIndexSpecification(zend_property_reference *property_reference, pval *value);
static char const *XmlIndexDeclaration_get_uri(XmlIndexDeclaration const *self){ return self->uri.c_str(); }
static char const *XmlIndexDeclaration_get_name(XmlIndexDeclaration const *self){ return self->name.c_str(); }
static char const *XmlIndexDeclaration_get_index(XmlIndexDeclaration const *self){ return self->index.c_str(); }
static int _wrap_propset_XmlIndexDeclaration(zend_property_reference *property_reference, pval *value);
static int _propset_XmlIndexDeclaration(zend_property_reference *property_reference, pval *value);
static pval _wrap_propget_XmlIndexDeclaration(zend_property_reference *property_reference);
static int _propget_XmlIndexDeclaration(zend_property_reference *property_reference, pval *value);
static char const *XmlQueryExpression_getXPathQuery(XmlQueryExpression const *self){
		return self->getXPathQuery().c_str();
	}
static int _wrap_propset_XmlQueryExpression(zend_property_reference *property_reference, pval *value);
static int _propset_XmlQueryExpression(zend_property_reference *property_reference, pval *value);
static pval _wrap_propget_XmlQueryExpression(zend_property_reference *property_reference);
static int _propget_XmlQueryExpression(zend_property_reference *property_reference, pval *value);
static int _wrap_propset_XmlModify(zend_property_reference *property_reference, pval *value);
static int _propset_XmlModify(zend_property_reference *property_reference, pval *value);
static pval _wrap_propget_XmlModify(zend_property_reference *property_reference);
static int _propget_XmlModify(zend_property_reference *property_reference, pval *value);
/* class entry subsection */
/* Function entries for DbTxn */
static zend_function_entry DbTxn_functions[] = {
	ZEND_NAMED_FE(abort,
		_wrap_DbTxn_abort, NULL)
	ZEND_NAMED_FE(commit,
		_wrap_DbTxn_commit, NULL)
	ZEND_NAMED_FE(discard,
		_wrap_DbTxn_discard, NULL)
	ZEND_NAMED_FE(id,
		_wrap_DbTxn_id, NULL)
	ZEND_NAMED_FE(set_timeout,
		_wrap_DbTxn_set_timeout, NULL)
	ZEND_NAMED_FE(dbtxn,
		_wrap_new_DbTxn, NULL)
	{ NULL, NULL, NULL}
};
/* Function entries for DbEnv */
static zend_function_entry DbEnv_functions[] = {
	ZEND_NAMED_FE(dbenv,
		_wrap_new_DbEnv, NULL)
	ZEND_NAMED_FE(close,
		_wrap_DbEnv_close, NULL)
	ZEND_NAMED_FE(dbremove,
		_wrap_DbEnv_dbremove, NULL)
	ZEND_NAMED_FE(dbrename,
		_wrap_DbEnv_dbrename, NULL)
	ZEND_NAMED_FE(open,
		_wrap_DbEnv_open, NULL)
	ZEND_NAMED_FE(remove,
		_wrap_DbEnv_remove, NULL)
	ZEND_NAMED_FE(set_cachesize,
		_wrap_DbEnv_set_cachesize, NULL)
	ZEND_NAMED_FE(set_data_dir,
		_wrap_DbEnv_set_data_dir, NULL)
	ZEND_NAMED_FE(set_encrypt,
		_wrap_DbEnv_set_encrypt, NULL)
	ZEND_NAMED_FE(set_errpfx,
		_wrap_DbEnv_set_errpfx, NULL)
	ZEND_NAMED_FE(set_flags,
		_wrap_DbEnv_set_flags, NULL)
	ZEND_NAMED_FE(set_lg_bsize,
		_wrap_DbEnv_set_lg_bsize, NULL)
	ZEND_NAMED_FE(set_lg_dir,
		_wrap_DbEnv_set_lg_dir, NULL)
	ZEND_NAMED_FE(set_lg_max,
		_wrap_DbEnv_set_lg_max, NULL)
	ZEND_NAMED_FE(set_lg_regionmax,
		_wrap_DbEnv_set_lg_regionmax, NULL)
	ZEND_NAMED_FE(set_lk_detect,
		_wrap_DbEnv_set_lk_detect, NULL)
	ZEND_NAMED_FE(set_lk_max_lockers,
		_wrap_DbEnv_set_lk_max_lockers, NULL)
	ZEND_NAMED_FE(set_lk_max_locks,
		_wrap_DbEnv_set_lk_max_locks, NULL)
	ZEND_NAMED_FE(set_lk_max_objects,
		_wrap_DbEnv_set_lk_max_objects, NULL)
	ZEND_NAMED_FE(set_mp_mmapsize,
		_wrap_DbEnv_set_mp_mmapsize, NULL)
	ZEND_NAMED_FE(set_shm_key,
		_wrap_DbEnv_set_shm_key, NULL)
	ZEND_NAMED_FE(set_timeout,
		_wrap_DbEnv_set_timeout, NULL)
	ZEND_NAMED_FE(set_tmp_dir,
		_wrap_DbEnv_set_tmp_dir, NULL)
	ZEND_NAMED_FE(set_tas_spins,
		_wrap_DbEnv_set_tas_spins, NULL)
	ZEND_NAMED_FE(set_tx_max,
		_wrap_DbEnv_set_tx_max, NULL)
	ZEND_NAMED_FE(set_verbose,
		_wrap_DbEnv_set_verbose, NULL)
	ZEND_NAMED_FE(version,
		_wrap_DbEnv_version, NULL)
	ZEND_NAMED_FE(strerror,
		_wrap_DbEnv_strerror, NULL)
	ZEND_NAMED_FE(txn_begin,
		_wrap_DbEnv_txn_begin, NULL)
	ZEND_NAMED_FE(txn_checkpoint,
		_wrap_DbEnv_txn_checkpoint, NULL)
	{ NULL, NULL, NULL}
};
/* Function entries for XmlContainer */
static zend_function_entry XmlContainer_functions[] = {
	ZEND_NAMED_FE(xmlcontainer,
		_wrap_new_XmlContainer, NULL)
	ZEND_NAMED_FE(setpagesize,
		_wrap_XmlContainer_setPageSize, NULL)
	ZEND_NAMED_FE(open,
		_wrap_XmlContainer_open, NULL)
	ZEND_NAMED_FE(exists,
		_wrap_XmlContainer_exists, NULL)
	ZEND_NAMED_FE(isopen,
		_wrap_XmlContainer_isOpen, NULL)
	ZEND_NAMED_FE(close,
		_wrap_XmlContainer_close, NULL)
	ZEND_NAMED_FE(setindexspecification,
		_wrap_XmlContainer_setIndexSpecification, NULL)
	ZEND_NAMED_FE(addindex,
		_wrap_XmlContainer_addIndex, NULL)
	ZEND_NAMED_FE(deleteindex,
		_wrap_XmlContainer_deleteIndex, NULL)
	ZEND_NAMED_FE(replaceindex,
		_wrap_XmlContainer_replaceIndex, NULL)
	ZEND_NAMED_FE(upgrade,
		_wrap_XmlContainer_upgrade, NULL)
	ZEND_NAMED_FE(getindexspecification,
		_wrap_XmlContainer_getIndexSpecification, NULL)
	ZEND_NAMED_FE(getname,
		_wrap_XmlContainer_getName, NULL)
	ZEND_NAMED_FE(setname,
		_wrap_XmlContainer_setName, NULL)
	ZEND_NAMED_FE(putdocument,
		_wrap_XmlContainer_putDocument, NULL)
	ZEND_NAMED_FE(updatedocument,
		_wrap_XmlContainer_updateDocument, NULL)
	ZEND_NAMED_FE(remove,
		_wrap_XmlContainer_remove, NULL)
	ZEND_NAMED_FE(rename,
		_wrap_XmlContainer_rename, NULL)
	ZEND_NAMED_FE(deletedocumentbyid,
		_wrap_XmlContainer_deleteDocumentByID, NULL)
	ZEND_NAMED_FE(deletedocument,
		_wrap_XmlContainer_deleteDocument, NULL)
	ZEND_NAMED_FE(modifydocument,
		_wrap_XmlContainer_modifyDocument, NULL)
	ZEND_NAMED_FE(getdocument,
		_wrap_XmlContainer_getDocument, NULL)
	ZEND_NAMED_FE(parsexpathexpression,
		_wrap_XmlContainer_parseXPathExpression, NULL)
	ZEND_NAMED_FE(querywithxpath,
		_wrap_XmlContainer_queryWithXPath, NULL)
	ZEND_NAMED_FE(querywithxpathexpression,
		_wrap_XmlContainer_queryWithXPathExpression, NULL)
	ZEND_NAMED_FE(query,
		_wrap_XmlContainer_query, NULL)
	ZEND_NAMED_FE(dump,
		_wrap_XmlContainer_dump, NULL)
	ZEND_NAMED_FE(load,
		_wrap_XmlContainer_load, NULL)
	ZEND_NAMED_FE(verify,
		_wrap_XmlContainer_verify, NULL)
	ZEND_NAMED_FE(setloglevel,
		_wrap_XmlContainer_setLogLevel, NULL)
	ZEND_NAMED_FE(setlogcategory,
		_wrap_XmlContainer_setLogCategory, NULL)
	ZEND_NAMED_FE(get_version_major,
		_wrap_XmlContainer_get_version_major, NULL)
	ZEND_NAMED_FE(get_version_minor,
		_wrap_XmlContainer_get_version_minor, NULL)
	ZEND_NAMED_FE(get_version_patch,
		_wrap_XmlContainer_get_version_patch, NULL)
	ZEND_NAMED_FE(get_version_string,
		_wrap_XmlContainer_get_version_string, NULL)
	{ NULL, NULL, NULL}
};
/* Function entries for XmlDocument */
static zend_function_entry XmlDocument_functions[] = {
	ZEND_NAMED_FE(xmldocument,
		_wrap_new_XmlDocument, NULL)
	ZEND_NAMED_FE(getid,
		_wrap_XmlDocument_getID, NULL)
	ZEND_NAMED_FE(setname,
		_wrap_XmlDocument_setName, NULL)
	ZEND_NAMED_FE(getname,
		_wrap_XmlDocument_getName, NULL)
	ZEND_NAMED_FE(setcontent,
		_wrap_XmlDocument_setContent, NULL)
	ZEND_NAMED_FE(getcontent,
		_wrap_XmlDocument_getContent, NULL)
	ZEND_NAMED_FE(modifydocument,
		_wrap_XmlDocument_modifyDocument, NULL)
	ZEND_NAMED_FE(getcontentasstring,
		_wrap_XmlDocument_getContentAsString, NULL)
	ZEND_NAMED_FE(setmetadata,
		_wrap_XmlDocument_setMetaData, NULL)
	ZEND_NAMED_FE(getmetadata,
		_wrap_XmlDocument_getMetaData, NULL)
	ZEND_NAMED_FE(querywithxpath,
		_wrap_XmlDocument_queryWithXPath, NULL)
	ZEND_NAMED_FE(querywithxpathexpression,
		_wrap_XmlDocument_queryWithXPathExpression, NULL)
	{ NULL, NULL, NULL}
};
/* Function entries for XmlQueryContext */
static zend_function_entry XmlQueryContext_functions[] = {
	ZEND_NAMED_FE(xmlquerycontext,
		_wrap_new_XmlQueryContext, NULL)
	ZEND_NAMED_FE(setnamespace,
		_wrap_XmlQueryContext_setNamespace, NULL)
	ZEND_NAMED_FE(getnamespace,
		_wrap_XmlQueryContext_getNamespace, NULL)
	ZEND_NAMED_FE(removenamespace,
		_wrap_XmlQueryContext_removeNamespace, NULL)
	ZEND_NAMED_FE(clearnamespaces,
		_wrap_XmlQueryContext_clearNamespaces, NULL)
	ZEND_NAMED_FE(setvariablevalue,
		_wrap_XmlQueryContext_setVariableValue, NULL)
	ZEND_NAMED_FE(setreturntype,
		_wrap_XmlQueryContext_setReturnType, NULL)
	ZEND_NAMED_FE(getreturntype,
		_wrap_XmlQueryContext_getReturnType, NULL)
	ZEND_NAMED_FE(setevaluationtype,
		_wrap_XmlQueryContext_setEvaluationType, NULL)
	ZEND_NAMED_FE(getevaluationtype,
		_wrap_XmlQueryContext_getEvaluationType, NULL)
	ZEND_NAMED_FE(setwithmetadata,
		_wrap_XmlQueryContext_setWithMetaData, NULL)
	ZEND_NAMED_FE(getwithmetadata,
		_wrap_XmlQueryContext_getWithMetaData, NULL)
	ZEND_NAMED_FE(getvariablevalue,
		_wrap_XmlQueryContext_getVariableValue, NULL)
	{ NULL, NULL, NULL}
};
/* Function entries for XmlResults */
static zend_function_entry XmlResults_functions[] = {
	ZEND_NAMED_FE(xmlresults,
		_wrap_new_XmlResults, NULL)
	ZEND_NAMED_FE(next,
		_wrap_XmlResults_next, NULL)
	ZEND_NAMED_FE(nextdocument,
		_wrap_XmlResults_nextDocument, NULL)
	ZEND_NAMED_FE(nextdocumentandvalue,
		_wrap_XmlResults_nextDocumentAndValue, NULL)
	ZEND_NAMED_FE(reset,
		_wrap_XmlResults_reset, NULL)
	ZEND_NAMED_FE(size,
		_wrap_XmlResults_size, NULL)
	ZEND_NAMED_FE(add,
		_wrap_XmlResults_add, NULL)
	{ NULL, NULL, NULL}
};
/* Function entries for XmlUpdateContext */
static zend_function_entry XmlUpdateContext_functions[] = {
	ZEND_NAMED_FE(xmlupdatecontext,
		_wrap_new_XmlUpdateContext, NULL)
	{ NULL, NULL, NULL}
};
/* Function entries for XmlValue */
static zend_function_entry XmlValue_functions[] = {
	ZEND_NAMED_FE(xmlvalue,
		_wrap_new_XmlValue, NULL)
	ZEND_NAMED_FE(xmlvaluefromdoc,
		_wrap_new_XmlValueFromDoc, NULL)
	ZEND_NAMED_FE(xmlvaluefromdouble,
		_wrap_new_XmlValueFromDouble, NULL)
	ZEND_NAMED_FE(xmlvaluefromchar,
		_wrap_new_XmlValueFromChar, NULL)
	ZEND_NAMED_FE(xmlvaluefrombool,
		_wrap_new_XmlValueFromBool, NULL)
	ZEND_NAMED_FE(xmlvaluefromnamedtype,
		_wrap_new_XmlValueFromNamedType, NULL)
	ZEND_NAMED_FE(gettype,
		_wrap_XmlValue_getType, NULL)
	ZEND_NAMED_FE(isnumber,
		_wrap_XmlValue_isNumber, NULL)
	ZEND_NAMED_FE(isstring,
		_wrap_XmlValue_isString, NULL)
	ZEND_NAMED_FE(isboolean,
		_wrap_XmlValue_isBoolean, NULL)
	ZEND_NAMED_FE(isnode,
		_wrap_XmlValue_isNode, NULL)
	ZEND_NAMED_FE(isdocument,
		_wrap_XmlValue_isDocument, NULL)
	ZEND_NAMED_FE(isvariable,
		_wrap_XmlValue_isVariable, NULL)
	ZEND_NAMED_FE(isnull,
		_wrap_XmlValue_isNull, NULL)
	ZEND_NAMED_FE(asnumber,
		_wrap_XmlValue_asNumber, NULL)
	ZEND_NAMED_FE(asstring,
		_wrap_XmlValue_asString, NULL)
	ZEND_NAMED_FE(asboolean,
		_wrap_XmlValue_asBoolean, NULL)
	ZEND_NAMED_FE(asdocument,
		_wrap_XmlValue_asDocument, NULL)
	ZEND_NAMED_FE(equals,
		_wrap_XmlValue_equals, NULL)
	{ NULL, NULL, NULL}
};
/* Function entries for XmlIndexSpecification */
static zend_function_entry XmlIndexSpecification_functions[] = {
	ZEND_NAMED_FE(xmlindexspecification,
		_wrap_new_XmlIndexSpecification, NULL)
	ZEND_NAMED_FE(addindex,
		_wrap_XmlIndexSpecification_addIndex, NULL)
	ZEND_NAMED_FE(deleteindex,
		_wrap_XmlIndexSpecification_deleteIndex, NULL)
	ZEND_NAMED_FE(replaceindex,
		_wrap_XmlIndexSpecification_replaceIndex, NULL)
	ZEND_NAMED_FE(reset,
		_wrap_XmlIndexSpecification_reset, NULL)
	ZEND_NAMED_FE(find,
		_wrap_XmlIndexSpecification_find, NULL)
	ZEND_NAMED_FE(next,
		_wrap_XmlIndexSpecification_next, NULL)
	{ NULL, NULL, NULL}
};
/* Function entries for XmlIndexDeclaration */
static zend_function_entry XmlIndexDeclaration_functions[] = {
	ZEND_NAMED_FE(get_uri,
		_wrap_XmlIndexDeclaration_get_uri, NULL)
	ZEND_NAMED_FE(get_name,
		_wrap_XmlIndexDeclaration_get_name, NULL)
	ZEND_NAMED_FE(get_index,
		_wrap_XmlIndexDeclaration_get_index, NULL)
	ZEND_NAMED_FE(xmlindexdeclaration,
		_wrap_new_XmlIndexDeclaration, NULL)
	{ NULL, NULL, NULL}
};
/* Function entries for XmlQueryExpression */
static zend_function_entry XmlQueryExpression_functions[] = {
	ZEND_NAMED_FE(xmlqueryexpression,
		_wrap_new_XmlQueryExpression, NULL)
	ZEND_NAMED_FE(getquerycontext,
		_wrap_XmlQueryExpression_getQueryContext, NULL)
	ZEND_NAMED_FE(getcontainer,
		_wrap_XmlQueryExpression_getContainer, NULL)
	ZEND_NAMED_FE(getxpathquery,
		_wrap_XmlQueryExpression_getXPathQuery, NULL)
	{ NULL, NULL, NULL}
};
/* Function entries for XmlModify */
static zend_function_entry XmlModify_functions[] = {
	ZEND_NAMED_FE(xmlmodify,
		_wrap_new_XmlModify, NULL)
	ZEND_NAMED_FE(setnewencoding,
		_wrap_XmlModify_setNewEncoding, NULL)
	ZEND_NAMED_FE(getnummodifications,
		_wrap_XmlModify_getNumModifications, NULL)
	{ NULL, NULL, NULL}
};


/* entry subsection */
/* Every non-class user visible function must have an entry here */
function_entry dbxml_php4_functions[] = {
	{NULL, NULL, NULL}
};

zend_module_entry dbxml_php4_module_entry = {
#if ZEND_MODULE_API_NO > 20010900
    STANDARD_MODULE_HEADER,
#endif
    "dbxml_php4",
    dbxml_php4_functions,
    PHP_MINIT(dbxml_php4),
    PHP_MSHUTDOWN(dbxml_php4),
    PHP_RINIT(dbxml_php4),
    PHP_RSHUTDOWN(dbxml_php4),
    PHP_MINFO(dbxml_php4),
#if ZEND_MODULE_API_NO > 20010900
    NO_VERSION_YET,
#endif
    STANDARD_MODULE_PROPERTIES
};
zend_module_entry* SWIG_module_entry = &dbxml_php4_module_entry;


/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */

static swig_type_info _swigt__p_XmlResults[] = {{"_p_XmlResults", 0, "XmlResults *", 0, 0, 0, 0},{"_p_XmlResults", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
static swig_type_info _swigt__p_XmlQueryContext[] = {{"_p_XmlQueryContext", 0, "XmlQueryContext *", 0, 0, 0, 0},{"_p_XmlQueryContext", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
static swig_type_info _swigt__p_XmlUpdateContext[] = {{"_p_XmlUpdateContext", 0, "XmlUpdateContext *", 0, 0, 0, 0},{"_p_XmlUpdateContext", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
static swig_type_info _swigt__p_XmlIndexSpecification[] = {{"_p_XmlIndexSpecification", 0, "XmlIndexSpecification *", 0, 0, 0, 0},{"_p_XmlIndexSpecification", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
static swig_type_info _swigt__p_u_int32_t[] = {{"_p_u_int32_t", 0, "u_int32_t *", 0, 0, 0, 0},{"_p_u_int32_t", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
static swig_type_info _swigt__p_XmlValue[] = {{"_p_XmlValue", 0, "XmlValue *", 0, 0, 0, 0},{"_p_XmlValue", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
static swig_type_info _swigt__p_char[] = {{"_p_char", 0, "char *", 0, 0, 0, 0},{"_p_char", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
static swig_type_info _swigt__p_XmlQueryExpression[] = {{"_p_XmlQueryExpression", 0, "XmlQueryExpression *", 0, 0, 0, 0},{"_p_XmlQueryExpression", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
static swig_type_info _swigt__p_DbTxn[] = {{"_p_DbTxn", 0, "DbTxn *", 0, 0, 0, 0},{"_p_DbTxn", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
static swig_type_info _swigt__p_XmlContainer[] = {{"_p_XmlContainer", 0, "XmlContainer *", 0, 0, 0, 0},{"_p_XmlContainer", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
static swig_type_info _swigt__p_DbEnv[] = {{"_p_DbEnv", 0, "DbEnv *", 0, 0, 0, 0},{"_p_DbEnv", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
static swig_type_info _swigt__p_XmlModify[] = {{"_p_XmlModify", 0, "XmlModify *", 0, 0, 0, 0},{"_p_XmlModify", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
static swig_type_info _swigt__p_XmlDocument[] = {{"_p_XmlDocument", 0, "XmlDocument *", 0, 0, 0, 0},{"_p_XmlDocument", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
static swig_type_info _swigt__int[] = {{"_int", 0, "int", 0, 0, 0, 0},{"_int", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
static swig_type_info _swigt__p_int[] = {{"_p_int", 0, "int *", 0, 0, 0, 0},{"_p_int", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
static swig_type_info _swigt__p_db_timeout_t[] = {{"_p_db_timeout_t", 0, "db_timeout_t *", 0, 0, 0, 0},{"_p_db_timeout_t", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};
static swig_type_info _swigt__p_XmlIndexDeclaration[] = {{"_p_XmlIndexDeclaration", 0, "XmlIndexDeclaration *", 0, 0, 0, 0},{"_p_XmlIndexDeclaration", 0, 0, 0, 0, 0, 0},{0, 0, 0, 0, 0, 0, 0}};

static swig_type_info *swig_types_initial[] = {
_swigt__p_XmlResults, 
_swigt__p_XmlQueryContext, 
_swigt__p_XmlUpdateContext, 
_swigt__p_XmlIndexSpecification, 
_swigt__p_u_int32_t, 
_swigt__p_XmlValue, 
_swigt__p_char, 
_swigt__p_XmlQueryExpression, 
_swigt__p_DbTxn, 
_swigt__p_XmlContainer, 
_swigt__p_DbEnv, 
_swigt__p_XmlModify, 
_swigt__p_XmlDocument, 
_swigt__int, 
_swigt__p_int, 
_swigt__p_db_timeout_t, 
_swigt__p_XmlIndexDeclaration, 
0
};


/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */

/* vdecl subsection */
static zend_class_entry ce_swig_DbTxn;
static zend_class_entry* ptr_ce_swig_DbTxn=NULL;
static zend_class_entry ce_swig_DbEnv;
static zend_class_entry* ptr_ce_swig_DbEnv=NULL;
static zend_class_entry ce_swig_XmlContainer;
static zend_class_entry* ptr_ce_swig_XmlContainer=NULL;
static zend_class_entry ce_swig_XmlDocument;
static zend_class_entry* ptr_ce_swig_XmlDocument=NULL;
static zend_class_entry ce_swig_XmlQueryContext;
static zend_class_entry* ptr_ce_swig_XmlQueryContext=NULL;
static zend_class_entry ce_swig_XmlResults;
static zend_class_entry* ptr_ce_swig_XmlResults=NULL;
static zend_class_entry ce_swig_XmlUpdateContext;
static zend_class_entry* ptr_ce_swig_XmlUpdateContext=NULL;
static zend_class_entry ce_swig_XmlValue;
static zend_class_entry* ptr_ce_swig_XmlValue=NULL;
static zend_class_entry ce_swig_XmlIndexSpecification;
static zend_class_entry* ptr_ce_swig_XmlIndexSpecification=NULL;
static zend_class_entry ce_swig_XmlIndexDeclaration;
static zend_class_entry* ptr_ce_swig_XmlIndexDeclaration=NULL;
static zend_class_entry ce_swig_XmlQueryExpression;
static zend_class_entry* ptr_ce_swig_XmlQueryExpression=NULL;
static zend_class_entry ce_swig_XmlModify;
static zend_class_entry* ptr_ce_swig_XmlModify=NULL;
static int le_swig__p_XmlResults=0; /* handle for XmlResults */
static int le_swig__p_XmlQueryContext=0; /* handle for XmlQueryContext */
static int le_swig__p_XmlUpdateContext=0; /* handle for XmlUpdateContext */
static int le_swig__p_XmlIndexSpecification=0; /* handle for XmlIndexSpecification */
static int le_swig__p_u_int32_t=0; /* handle for XmlIndexSpecification */
static int le_swig__p_XmlValue=0; /* handle for XmlValue */
static int le_swig__p_char=0; /* handle for XmlValue */
static int le_swig__p_XmlQueryExpression=0; /* handle for XmlQueryExpression */
static int le_swig__p_DbTxn=0; /* handle for DbTxn */
static int le_swig__p_XmlContainer=0; /* handle for XmlContainer */
static int le_swig__p_DbEnv=0; /* handle for DbEnv */
static int le_swig__p_XmlModify=0; /* handle for XmlModify */
static int le_swig__p_XmlDocument=0; /* handle for XmlDocument */
static int le_swig__int=0; /* handle for XmlDocument */
static int le_swig__p_int=0; /* handle for XmlDocument */
static int le_swig__p_db_timeout_t=0; /* handle for XmlDocument */
static int le_swig__p_XmlIndexDeclaration=0; /* handle for XmlIndexDeclaration */
/* end vdecl subsection */
/* wrapper section */
ZEND_NAMED_FUNCTION(_wrap_DbTxn_abort) {
    DbTxn *arg1 = (DbTxn *) 0 ;
    int result;
    zval **args[2];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_DbTxn) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of DbTxn_abort. Expected %s", 1-argbase, SWIGTYPE_p_DbTxn->name);
    }
    
    result = (int)(arg1)->abort();
    
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_DbTxn_commit) {
    DbTxn *arg1 = (DbTxn *) 0 ;
    u_int32_t arg2 ;
    int result;
    zval **args[3];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 2) || (zend_get_parameters_array_ex(2-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_DbTxn) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of DbTxn_commit. Expected %s", 1-argbase, SWIGTYPE_p_DbTxn->name);
    }
    
    
    convert_to_long_ex(args[1-argbase]);
    arg2 = (u_int32_t) Z_LVAL_PP(args[1-argbase]);
    
    result = (int)(arg1)->commit(arg2);
    
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_DbTxn_discard) {
    DbTxn *arg1 = (DbTxn *) 0 ;
    u_int32_t arg2 ;
    int result;
    zval **args[3];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 2) || (zend_get_parameters_array_ex(2-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_DbTxn) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of DbTxn_discard. Expected %s", 1-argbase, SWIGTYPE_p_DbTxn->name);
    }
    
    
    convert_to_long_ex(args[1-argbase]);
    arg2 = (u_int32_t) Z_LVAL_PP(args[1-argbase]);
    
    result = (int)(arg1)->discard(arg2);
    
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_DbTxn_id) {
    DbTxn *arg1 = (DbTxn *) 0 ;
    u_int32_t result;
    zval **args[2];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_DbTxn) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of DbTxn_id. Expected %s", 1-argbase, SWIGTYPE_p_DbTxn->name);
    }
    
    result = (u_int32_t)(arg1)->id();
    
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_DbTxn_set_timeout) {
    DbTxn *arg1 = (DbTxn *) 0 ;
    db_timeout_t arg2 ;
    u_int32_t arg3 ;
    int result;
    zval **args[4];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 3) || (zend_get_parameters_array_ex(3-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_DbTxn) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of DbTxn_set_timeout. Expected %s", 1-argbase, SWIGTYPE_p_DbTxn->name);
    }
    
    {
        db_timeout_t * argp;
        if(SWIG_ConvertPtr(*args[1-argbase], (void **) &argp, SWIGTYPE_p_db_timeout_t) < 0) {
            zend_error(E_ERROR, "Type error in argument %d of DbTxn_set_timeout. Expected %s", 2-argbase, SWIGTYPE_p_db_timeout_t->name);
        }
        arg2 = *argp;
    }
    
    convert_to_long_ex(args[2-argbase]);
    arg3 = (u_int32_t) Z_LVAL_PP(args[2-argbase]);
    
    result = (int)(arg1)->set_timeout(arg2,arg3);
    
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_new_DbTxn) {
    zend_error(E_ERROR,"Cannot create swig object type: DbTxn as the underlying object is abstract");
}





/* property handler for class DbTxn */
static pval _wrap_propget_DbTxn(zend_property_reference *property_reference) {
  pval result;
  pval **_result;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  result.type = IS_NULL;
  if (_propget_DbTxn(property_reference, &result)==SUCCESS) return result;
  /* return it ourselves */
  if (zend_hash_find(Z_OBJPROP_P(property_reference->object),Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),(void**)&_result)==SUCCESS) {
  zval *_value;
  MAKE_STD_ZVAL(_value);  *_value=**_result;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return *_value;
  }
  result.type = IS_NULL;
  return result;
}
static int _propget_DbTxn(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  return FAILURE;
}

static int _wrap_propset_DbTxn(zend_property_reference *property_reference, pval *value) { 
  zval * _value;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  if (_propset_DbTxn(property_reference, value)==SUCCESS) return SUCCESS;
  /* set it ourselves as it is DbTxn */
  MAKE_STD_ZVAL(_value);
  *_value=*value;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return add_property_zval_ex(property_reference->object,Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),_value);
}
static int _propset_DbTxn(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  return FAILURE;
}

ZEND_NAMED_FUNCTION(_wrap_new_DbEnv) {
    u_int32_t arg1 ;
    DbEnv *result;
    zval **args[2];
    int argbase=0 ;
    
    /* NATIVE Constructor */
    int self_constructor=1;
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    convert_to_long_ex(((0<argbase)?(&this_ptr):(args[0-argbase])));
    arg1 = (u_int32_t) Z_LVAL_PP(((0<argbase)?(&this_ptr):(args[0-argbase])));
    
    result = (DbEnv *)new DbEnv(arg1);
    
    
    SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_DbEnv, 1);
    
    /* Wrap this return value */
    if (this_ptr) {
        /* NATIVE Constructor, use this_ptr */
        zval *_cPtr; MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        add_property_zval(this_ptr,"_cPtr",_cPtr);
    }else if (! this_ptr) {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_DbEnv);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
}


/* This function is designed to be called by the zend list destructors to typecast and do the actual destruction */
void __wrap_delete_DbEnv(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
    swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
    void *ptr=value->ptr ;
    int newobject=value->newobject ;
    DbEnv *arg1 = (DbEnv *) 0 ;
    
    efree(value);
    if (! newobject) return; /* can't delete it! */
    SWIG_ZTS_ConvertResourceData(ptr,rsrc->type,type_name,(void **) &arg1,SWIGTYPE_p_DbEnv TSRMLS_CC);
    if (! arg1) zend_error(E_ERROR, "DbEnv resource already free'd");
    delete arg1;
    
}


ZEND_NAMED_FUNCTION(_wrap_delete_DbEnv) {
    DbEnv *arg1 = (DbEnv *) 0 ;
    zval **args[2];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_DbEnv) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of delete_DbEnv. Expected %s", 1-argbase, SWIGTYPE_p_DbEnv->name);
    }
    
    /*if ((*args[0])->type==IS_RESOURCE) { */
    /*  Get zend list destructor to free it */
    /*  zend_list_delete(Z_LVAL_PP(args[0])); */
    /* } else {*/
    delete arg1;
    
    /*}*/
    
}


ZEND_NAMED_FUNCTION(_wrap_DbEnv_close) {
    DbEnv *arg1 = (DbEnv *) 0 ;
    u_int32_t arg2 ;
    int result;
    zval **args[3];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 2) || (zend_get_parameters_array_ex(2-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_DbEnv) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of DbEnv_close. Expected %s", 1-argbase, SWIGTYPE_p_DbEnv->name);
    }
    
    
    convert_to_long_ex(args[1-argbase]);
    arg2 = (u_int32_t) Z_LVAL_PP(args[1-argbase]);
    
    result = (int)(arg1)->close(arg2);
    
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_DbEnv_dbremove) {
    DbEnv *arg1 = (DbEnv *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    char *arg3 ;
    char *arg4 ;
    u_int32_t arg5 ;
    int result;
    zval **args[6];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 5) || (zend_get_parameters_array_ex(5-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_DbEnv) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of DbEnv_dbremove. Expected %s", 1-argbase, SWIGTYPE_p_DbEnv->name);
    }
    
    
    if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_DbTxn) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of DbEnv_dbremove. Expected %s", 2-argbase, SWIGTYPE_p_DbTxn->name);
    }
    
    
    convert_to_string_ex(args[2-argbase]);
    arg3 = (char *) Z_STRVAL_PP(args[2-argbase]);
    
    
    convert_to_string_ex(args[3-argbase]);
    arg4 = (char *) Z_STRVAL_PP(args[3-argbase]);
    
    
    convert_to_long_ex(args[4-argbase]);
    arg5 = (u_int32_t) Z_LVAL_PP(args[4-argbase]);
    
    result = (int)(arg1)->dbremove(arg2,(char const *)arg3,(char const *)arg4,arg5);
    
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_DbEnv_dbrename) {
    DbEnv *arg1 = (DbEnv *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    char *arg3 ;
    char *arg4 ;
    char *arg5 ;
    u_int32_t arg6 ;
    int result;
    zval **args[7];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 6) || (zend_get_parameters_array_ex(6-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_DbEnv) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of DbEnv_dbrename. Expected %s", 1-argbase, SWIGTYPE_p_DbEnv->name);
    }
    
    
    if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_DbTxn) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of DbEnv_dbrename. Expected %s", 2-argbase, SWIGTYPE_p_DbTxn->name);
    }
    
    
    convert_to_string_ex(args[2-argbase]);
    arg3 = (char *) Z_STRVAL_PP(args[2-argbase]);
    
    
    convert_to_string_ex(args[3-argbase]);
    arg4 = (char *) Z_STRVAL_PP(args[3-argbase]);
    
    
    convert_to_string_ex(args[4-argbase]);
    arg5 = (char *) Z_STRVAL_PP(args[4-argbase]);
    
    
    convert_to_long_ex(args[5-argbase]);
    arg6 = (u_int32_t) Z_LVAL_PP(args[5-argbase]);
    
    result = (int)(arg1)->dbrename(arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5,arg6);
    
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_DbEnv_open) {
    DbEnv *arg1 = (DbEnv *) 0 ;
    char *arg2 ;
    u_int32_t arg3 ;
    int arg4 ;
    int result;
    zval **args[5];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 4) || (zend_get_parameters_array_ex(4-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_DbEnv) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of DbEnv_open. Expected %s", 1-argbase, SWIGTYPE_p_DbEnv->name);
    }
    
    
    convert_to_string_ex(args[1-argbase]);
    arg2 = (char *) Z_STRVAL_PP(args[1-argbase]);
    
    
    convert_to_long_ex(args[2-argbase]);
    arg3 = (u_int32_t) Z_LVAL_PP(args[2-argbase]);
    
    
    convert_to_long_ex(args[3-argbase]);
    arg4 = (int) Z_LVAL_PP(args[3-argbase]);
    
    result = (int)(arg1)->open((char const *)arg2,arg3,arg4);
    
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_DbEnv_remove) {
    DbEnv *arg1 = (DbEnv *) 0 ;
    char *arg2 ;
    u_int32_t arg3 ;
    int result;
    zval **args[4];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 3) || (zend_get_parameters_array_ex(3-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_DbEnv) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of DbEnv_remove. Expected %s", 1-argbase, SWIGTYPE_p_DbEnv->name);
    }
    
    
    convert_to_string_ex(args[1-argbase]);
    arg2 = (char *) Z_STRVAL_PP(args[1-argbase]);
    
    
    convert_to_long_ex(args[2-argbase]);
    arg3 = (u_int32_t) Z_LVAL_PP(args[2-argbase]);
    
    result = (int)(arg1)->remove((char const *)arg2,arg3);
    
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_DbEnv_set_cachesize) {
    DbEnv *arg1 = (DbEnv *) 0 ;
    u_int32_t arg2 ;
    u_int32_t arg3 ;
    int arg4 ;
    int result;
    zval **args[5];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 4) || (zend_get_parameters_array_ex(4-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_DbEnv) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of DbEnv_set_cachesize. Expected %s", 1-argbase, SWIGTYPE_p_DbEnv->name);
    }
    
    
    convert_to_long_ex(args[1-argbase]);
    arg2 = (u_int32_t) Z_LVAL_PP(args[1-argbase]);
    
    
    convert_to_long_ex(args[2-argbase]);
    arg3 = (u_int32_t) Z_LVAL_PP(args[2-argbase]);
    
    
    convert_to_long_ex(args[3-argbase]);
    arg4 = (int) Z_LVAL_PP(args[3-argbase]);
    
    result = (int)(arg1)->set_cachesize(arg2,arg3,arg4);
    
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_DbEnv_set_data_dir) {
    DbEnv *arg1 = (DbEnv *) 0 ;
    char *arg2 ;
    int result;
    zval **args[3];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 2) || (zend_get_parameters_array_ex(2-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_DbEnv) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of DbEnv_set_data_dir. Expected %s", 1-argbase, SWIGTYPE_p_DbEnv->name);
    }
    
    
    convert_to_string_ex(args[1-argbase]);
    arg2 = (char *) Z_STRVAL_PP(args[1-argbase]);
    
    result = (int)(arg1)->set_data_dir((char const *)arg2);
    
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_DbEnv_set_encrypt) {
    DbEnv *arg1 = (DbEnv *) 0 ;
    char *arg2 ;
    u_int32_t arg3 ;
    int result;
    zval **args[4];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 3) || (zend_get_parameters_array_ex(3-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_DbEnv) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of DbEnv_set_encrypt. Expected %s", 1-argbase, SWIGTYPE_p_DbEnv->name);
    }
    
    
    convert_to_string_ex(args[1-argbase]);
    arg2 = (char *) Z_STRVAL_PP(args[1-argbase]);
    
    
    convert_to_long_ex(args[2-argbase]);
    arg3 = (u_int32_t) Z_LVAL_PP(args[2-argbase]);
    
    result = (int)(arg1)->set_encrypt((char const *)arg2,arg3);
    
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_DbEnv_set_errpfx) {
    DbEnv *arg1 = (DbEnv *) 0 ;
    char *arg2 ;
    zval **args[3];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 2) || (zend_get_parameters_array_ex(2-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_DbEnv) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of DbEnv_set_errpfx. Expected %s", 1-argbase, SWIGTYPE_p_DbEnv->name);
    }
    
    
    convert_to_string_ex(args[1-argbase]);
    arg2 = (char *) Z_STRVAL_PP(args[1-argbase]);
    
    (arg1)->set_errpfx((char const *)arg2);
    
    
}


ZEND_NAMED_FUNCTION(_wrap_DbEnv_set_flags) {
    DbEnv *arg1 = (DbEnv *) 0 ;
    u_int32_t arg2 ;
    int arg3 ;
    int result;
    zval **args[4];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 3) || (zend_get_parameters_array_ex(3-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_DbEnv) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of DbEnv_set_flags. Expected %s", 1-argbase, SWIGTYPE_p_DbEnv->name);
    }
    
    
    convert_to_long_ex(args[1-argbase]);
    arg2 = (u_int32_t) Z_LVAL_PP(args[1-argbase]);
    
    
    convert_to_long_ex(args[2-argbase]);
    arg3 = (int) Z_LVAL_PP(args[2-argbase]);
    
    result = (int)(arg1)->set_flags(arg2,arg3);
    
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_DbEnv_set_lg_bsize) {
    DbEnv *arg1 = (DbEnv *) 0 ;
    u_int32_t arg2 ;
    int result;
    zval **args[3];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 2) || (zend_get_parameters_array_ex(2-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_DbEnv) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of DbEnv_set_lg_bsize. Expected %s", 1-argbase, SWIGTYPE_p_DbEnv->name);
    }
    
    
    convert_to_long_ex(args[1-argbase]);
    arg2 = (u_int32_t) Z_LVAL_PP(args[1-argbase]);
    
    result = (int)(arg1)->set_lg_bsize(arg2);
    
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_DbEnv_set_lg_dir) {
    DbEnv *arg1 = (DbEnv *) 0 ;
    char *arg2 ;
    int result;
    zval **args[3];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 2) || (zend_get_parameters_array_ex(2-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_DbEnv) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of DbEnv_set_lg_dir. Expected %s", 1-argbase, SWIGTYPE_p_DbEnv->name);
    }
    
    
    convert_to_string_ex(args[1-argbase]);
    arg2 = (char *) Z_STRVAL_PP(args[1-argbase]);
    
    result = (int)(arg1)->set_lg_dir((char const *)arg2);
    
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_DbEnv_set_lg_max) {
    DbEnv *arg1 = (DbEnv *) 0 ;
    u_int32_t arg2 ;
    int result;
    zval **args[3];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 2) || (zend_get_parameters_array_ex(2-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_DbEnv) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of DbEnv_set_lg_max. Expected %s", 1-argbase, SWIGTYPE_p_DbEnv->name);
    }
    
    
    convert_to_long_ex(args[1-argbase]);
    arg2 = (u_int32_t) Z_LVAL_PP(args[1-argbase]);
    
    result = (int)(arg1)->set_lg_max(arg2);
    
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_DbEnv_set_lg_regionmax) {
    DbEnv *arg1 = (DbEnv *) 0 ;
    u_int32_t arg2 ;
    int result;
    zval **args[3];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 2) || (zend_get_parameters_array_ex(2-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_DbEnv) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of DbEnv_set_lg_regionmax. Expected %s", 1-argbase, SWIGTYPE_p_DbEnv->name);
    }
    
    
    convert_to_long_ex(args[1-argbase]);
    arg2 = (u_int32_t) Z_LVAL_PP(args[1-argbase]);
    
    result = (int)(arg1)->set_lg_regionmax(arg2);
    
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_DbEnv_set_lk_detect) {
    DbEnv *arg1 = (DbEnv *) 0 ;
    u_int32_t arg2 ;
    int result;
    zval **args[3];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 2) || (zend_get_parameters_array_ex(2-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_DbEnv) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of DbEnv_set_lk_detect. Expected %s", 1-argbase, SWIGTYPE_p_DbEnv->name);
    }
    
    
    convert_to_long_ex(args[1-argbase]);
    arg2 = (u_int32_t) Z_LVAL_PP(args[1-argbase]);
    
    result = (int)(arg1)->set_lk_detect(arg2);
    
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_DbEnv_set_lk_max_lockers) {
    DbEnv *arg1 = (DbEnv *) 0 ;
    u_int32_t arg2 ;
    int result;
    zval **args[3];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 2) || (zend_get_parameters_array_ex(2-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_DbEnv) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of DbEnv_set_lk_max_lockers. Expected %s", 1-argbase, SWIGTYPE_p_DbEnv->name);
    }
    
    
    convert_to_long_ex(args[1-argbase]);
    arg2 = (u_int32_t) Z_LVAL_PP(args[1-argbase]);
    
    result = (int)(arg1)->set_lk_max_lockers(arg2);
    
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_DbEnv_set_lk_max_locks) {
    DbEnv *arg1 = (DbEnv *) 0 ;
    u_int32_t arg2 ;
    int result;
    zval **args[3];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 2) || (zend_get_parameters_array_ex(2-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_DbEnv) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of DbEnv_set_lk_max_locks. Expected %s", 1-argbase, SWIGTYPE_p_DbEnv->name);
    }
    
    
    convert_to_long_ex(args[1-argbase]);
    arg2 = (u_int32_t) Z_LVAL_PP(args[1-argbase]);
    
    result = (int)(arg1)->set_lk_max_locks(arg2);
    
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_DbEnv_set_lk_max_objects) {
    DbEnv *arg1 = (DbEnv *) 0 ;
    u_int32_t arg2 ;
    int result;
    zval **args[3];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 2) || (zend_get_parameters_array_ex(2-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_DbEnv) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of DbEnv_set_lk_max_objects. Expected %s", 1-argbase, SWIGTYPE_p_DbEnv->name);
    }
    
    
    convert_to_long_ex(args[1-argbase]);
    arg2 = (u_int32_t) Z_LVAL_PP(args[1-argbase]);
    
    result = (int)(arg1)->set_lk_max_objects(arg2);
    
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_DbEnv_set_mp_mmapsize) {
    DbEnv *arg1 = (DbEnv *) 0 ;
    size_t arg2 ;
    int result;
    zval **args[3];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 2) || (zend_get_parameters_array_ex(2-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_DbEnv) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of DbEnv_set_mp_mmapsize. Expected %s", 1-argbase, SWIGTYPE_p_DbEnv->name);
    }
    
    
    convert_to_long_ex(args[1-argbase]);
    arg2 = (size_t) Z_LVAL_PP(args[1-argbase]);
    
    result = (int)(arg1)->set_mp_mmapsize(arg2);
    
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_DbEnv_set_shm_key) {
    DbEnv *arg1 = (DbEnv *) 0 ;
    long arg2 ;
    int result;
    zval **args[3];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 2) || (zend_get_parameters_array_ex(2-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_DbEnv) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of DbEnv_set_shm_key. Expected %s", 1-argbase, SWIGTYPE_p_DbEnv->name);
    }
    
    
    convert_to_long_ex(args[1-argbase]);
    arg2 = (long) Z_LVAL_PP(args[1-argbase]);
    
    result = (int)(arg1)->set_shm_key(arg2);
    
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_DbEnv_set_timeout) {
    DbEnv *arg1 = (DbEnv *) 0 ;
    db_timeout_t arg2 ;
    u_int32_t arg3 ;
    int result;
    zval **args[4];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 3) || (zend_get_parameters_array_ex(3-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_DbEnv) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of DbEnv_set_timeout. Expected %s", 1-argbase, SWIGTYPE_p_DbEnv->name);
    }
    
    {
        db_timeout_t * argp;
        if(SWIG_ConvertPtr(*args[1-argbase], (void **) &argp, SWIGTYPE_p_db_timeout_t) < 0) {
            zend_error(E_ERROR, "Type error in argument %d of DbEnv_set_timeout. Expected %s", 2-argbase, SWIGTYPE_p_db_timeout_t->name);
        }
        arg2 = *argp;
    }
    
    convert_to_long_ex(args[2-argbase]);
    arg3 = (u_int32_t) Z_LVAL_PP(args[2-argbase]);
    
    result = (int)(arg1)->set_timeout(arg2,arg3);
    
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_DbEnv_set_tmp_dir) {
    DbEnv *arg1 = (DbEnv *) 0 ;
    char *arg2 ;
    int result;
    zval **args[3];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 2) || (zend_get_parameters_array_ex(2-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_DbEnv) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of DbEnv_set_tmp_dir. Expected %s", 1-argbase, SWIGTYPE_p_DbEnv->name);
    }
    
    
    convert_to_string_ex(args[1-argbase]);
    arg2 = (char *) Z_STRVAL_PP(args[1-argbase]);
    
    result = (int)(arg1)->set_tmp_dir((char const *)arg2);
    
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_DbEnv_set_tas_spins) {
    DbEnv *arg1 = (DbEnv *) 0 ;
    u_int32_t arg2 ;
    int result;
    zval **args[3];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 2) || (zend_get_parameters_array_ex(2-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_DbEnv) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of DbEnv_set_tas_spins. Expected %s", 1-argbase, SWIGTYPE_p_DbEnv->name);
    }
    
    
    convert_to_long_ex(args[1-argbase]);
    arg2 = (u_int32_t) Z_LVAL_PP(args[1-argbase]);
    
    result = (int)(arg1)->set_tas_spins(arg2);
    
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_DbEnv_set_tx_max) {
    DbEnv *arg1 = (DbEnv *) 0 ;
    u_int32_t arg2 ;
    int result;
    zval **args[3];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 2) || (zend_get_parameters_array_ex(2-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_DbEnv) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of DbEnv_set_tx_max. Expected %s", 1-argbase, SWIGTYPE_p_DbEnv->name);
    }
    
    
    convert_to_long_ex(args[1-argbase]);
    arg2 = (u_int32_t) Z_LVAL_PP(args[1-argbase]);
    
    result = (int)(arg1)->set_tx_max(arg2);
    
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_DbEnv_set_verbose) {
    DbEnv *arg1 = (DbEnv *) 0 ;
    u_int32_t arg2 ;
    int arg3 ;
    int result;
    zval **args[4];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 3) || (zend_get_parameters_array_ex(3-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_DbEnv) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of DbEnv_set_verbose. Expected %s", 1-argbase, SWIGTYPE_p_DbEnv->name);
    }
    
    
    convert_to_long_ex(args[1-argbase]);
    arg2 = (u_int32_t) Z_LVAL_PP(args[1-argbase]);
    
    
    convert_to_long_ex(args[2-argbase]);
    arg3 = (int) Z_LVAL_PP(args[2-argbase]);
    
    result = (int)(arg1)->set_verbose(arg2,arg3);
    
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_DbEnv_version) {
    int *arg1 = (int *) 0 ;
    int *arg2 = (int *) 0 ;
    int *arg3 = (int *) 0 ;
    char *result;
    int intr1 ;
    int force1 ;
    int intr2 ;
    int force2 ;
    int intr3 ;
    int force3 ;
    zval **args[4];
    int argbase=0 ;
    zval ** _saved[3] ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 3) || (zend_get_parameters_array_ex(3-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    /* inout typemap for int using convert_to_long_ex and ZVAL_LONG */
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_int) < 0) {
        /* So... we didn't get a ref or ptr, but can it be reasonably 
               co-erced into what we were looking for a ref of or ptr to? */
        if (!PZVAL_IS_REF(*((0<argbase)?(&this_ptr):(args[0-argbase]))) && (*((0<argbase)?(&this_ptr):(args[0-argbase])))->type==IS_NULL) {
            // null passed not by reference means pass NULL
            arg1 = NULL;
            force1=0;
        }else if (PZVAL_IS_REF(*((0<argbase)?(&this_ptr):(args[0-argbase]))) &&
        ((*((0<argbase)?(&this_ptr):(args[0-argbase])))->type==IS_STRING ||
        (*((0<argbase)?(&this_ptr):(args[0-argbase])))->type==IS_LONG ||
        /* Null passed by reference means we want a value back */
        (*((0<argbase)?(&this_ptr):(args[0-argbase])))->type==IS_NULL ||
        (*((0<argbase)?(&this_ptr):(args[0-argbase])))->type==IS_BOOL ||
        (*((0<argbase)?(&this_ptr):(args[0-argbase])))->type==IS_DOUBLE)) {
            convert_to_long_ex(((0<argbase)?(&this_ptr):(args[0-argbase])));
            intr1 = (int) (*((0<argbase)?(&this_ptr):(args[0-argbase])))->value.lval;
            arg1 = &intr1;
            /* have to passback arg$arg too */
            force1=1;
        }else {
            /* wasn't a pre/ref/thing, OR anything like an int thing */
            force1=0;
            zend_error(E_ERROR, "Type error in argument %d of DbEnv_version. Expected %s or at least something looking vaguely like a number hopefully passed by reference", 1-argbase, SWIGTYPE_p_int->name);
        }
    }else force1=0;
    
    
    /* inout typemap for int using convert_to_long_ex and ZVAL_LONG */
    if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_int) < 0) {
        /* So... we didn't get a ref or ptr, but can it be reasonably 
               co-erced into what we were looking for a ref of or ptr to? */
        if (!PZVAL_IS_REF(*args[1-argbase]) && (*args[1-argbase])->type==IS_NULL) {
            // null passed not by reference means pass NULL
            arg2 = NULL;
            force2=0;
        }else if (PZVAL_IS_REF(*args[1-argbase]) &&
        ((*args[1-argbase])->type==IS_STRING ||
        (*args[1-argbase])->type==IS_LONG ||
        /* Null passed by reference means we want a value back */
        (*args[1-argbase])->type==IS_NULL ||
        (*args[1-argbase])->type==IS_BOOL ||
        (*args[1-argbase])->type==IS_DOUBLE)) {
            convert_to_long_ex(args[1-argbase]);
            intr2 = (int) (*args[1-argbase])->value.lval;
            arg2 = &intr2;
            /* have to passback arg$arg too */
            force2=1;
        }else {
            /* wasn't a pre/ref/thing, OR anything like an int thing */
            force2=0;
            zend_error(E_ERROR, "Type error in argument %d of DbEnv_version. Expected %s or at least something looking vaguely like a number hopefully passed by reference", 2-argbase, SWIGTYPE_p_int->name);
        }
    }else force2=0;
    
    
    /* inout typemap for int using convert_to_long_ex and ZVAL_LONG */
    if(SWIG_ConvertPtr(*args[2-argbase], (void **) &arg3, SWIGTYPE_p_int) < 0) {
        /* So... we didn't get a ref or ptr, but can it be reasonably 
               co-erced into what we were looking for a ref of or ptr to? */
        if (!PZVAL_IS_REF(*args[2-argbase]) && (*args[2-argbase])->type==IS_NULL) {
            // null passed not by reference means pass NULL
            arg3 = NULL;
            force3=0;
        }else if (PZVAL_IS_REF(*args[2-argbase]) &&
        ((*args[2-argbase])->type==IS_STRING ||
        (*args[2-argbase])->type==IS_LONG ||
        /* Null passed by reference means we want a value back */
        (*args[2-argbase])->type==IS_NULL ||
        (*args[2-argbase])->type==IS_BOOL ||
        (*args[2-argbase])->type==IS_DOUBLE)) {
            convert_to_long_ex(args[2-argbase]);
            intr3 = (int) (*args[2-argbase])->value.lval;
            arg3 = &intr3;
            /* have to passback arg$arg too */
            force3=1;
        }else {
            /* wasn't a pre/ref/thing, OR anything like an int thing */
            force3=0;
            zend_error(E_ERROR, "Type error in argument %d of DbEnv_version. Expected %s or at least something looking vaguely like a number hopefully passed by reference", 3-argbase, SWIGTYPE_p_int->name);
        }
    }else force3=0;
    
    _saved[0] = ((0<argbase)?(&this_ptr):(args[0-argbase]));
    _saved[1] = args[1-argbase];
    _saved[2] = args[2-argbase];
    result = (char *)DbEnv::version(arg1,arg2,arg3);
    
    
    ZVAL_STRING(return_value,result, 1);
    
    
    if (force1) {
        /* pass back arg1 through params (_saved[0]) if we can */
        if(! PZVAL_IS_REF(*_saved[0])) {
            zend_error(E_WARNING, "Parameter %d of DbEnv_version wasn't passed by reference [argout int *, int &]",1-argbase);
        }else {
            ZVAL_LONG(*_saved[0],intr1);	
        }
    }
    
    
    if (force2) {
        /* pass back arg2 through params (_saved[1]) if we can */
        if(! PZVAL_IS_REF(*_saved[1])) {
            zend_error(E_WARNING, "Parameter %d of DbEnv_version wasn't passed by reference [argout int *, int &]",2-argbase);
        }else {
            ZVAL_LONG(*_saved[1],intr2);	
        }
    }
    
    
    if (force3) {
        /* pass back arg3 through params (_saved[2]) if we can */
        if(! PZVAL_IS_REF(*_saved[2])) {
            zend_error(E_WARNING, "Parameter %d of DbEnv_version wasn't passed by reference [argout int *, int &]",3-argbase);
        }else {
            ZVAL_LONG(*_saved[2],intr3);	
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_DbEnv_strerror) {
    int arg1 ;
    char *result;
    zval **args[2];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    convert_to_long_ex(((0<argbase)?(&this_ptr):(args[0-argbase])));
    arg1 = (int) Z_LVAL_PP(((0<argbase)?(&this_ptr):(args[0-argbase])));
    
    result = (char *)DbEnv::strerror(arg1);
    
    
    ZVAL_STRING(return_value,result, 1);
    
}


ZEND_NAMED_FUNCTION(_wrap_DbEnv_txn_begin) {
    DbEnv *arg1 = (DbEnv *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    u_int32_t arg3 ;
    DbTxn *result;
    zval **args[4];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 3) || (zend_get_parameters_array_ex(3-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_DbEnv) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of DbEnv_txn_begin. Expected %s", 1-argbase, SWIGTYPE_p_DbEnv->name);
    }
    
    
    if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_DbTxn) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of DbEnv_txn_begin. Expected %s", 2-argbase, SWIGTYPE_p_DbTxn->name);
    }
    
    
    convert_to_long_ex(args[2-argbase]);
    arg3 = (u_int32_t) Z_LVAL_PP(args[2-argbase]);
    
    result = (DbTxn *)DbEnv_txn_begin(arg1,arg2,arg3);
    
    
    SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_DbTxn, 0);
    
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_DbTxn);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
}


ZEND_NAMED_FUNCTION(_wrap_DbEnv_txn_checkpoint) {
    DbEnv *arg1 = (DbEnv *) 0 ;
    u_int32_t arg2 ;
    u_int32_t arg3 ;
    u_int32_t arg4 ;
    int result;
    zval **args[5];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 4) || (zend_get_parameters_array_ex(4-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_DbEnv) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of DbEnv_txn_checkpoint. Expected %s", 1-argbase, SWIGTYPE_p_DbEnv->name);
    }
    
    
    convert_to_long_ex(args[1-argbase]);
    arg2 = (u_int32_t) Z_LVAL_PP(args[1-argbase]);
    
    
    convert_to_long_ex(args[2-argbase]);
    arg3 = (u_int32_t) Z_LVAL_PP(args[2-argbase]);
    
    
    convert_to_long_ex(args[3-argbase]);
    arg4 = (u_int32_t) Z_LVAL_PP(args[3-argbase]);
    
    result = (int)(arg1)->txn_checkpoint(arg2,arg3,arg4);
    
    
    ZVAL_LONG(return_value,result);
    
}


/* property handler for class DbEnv */
static pval _wrap_propget_DbEnv(zend_property_reference *property_reference) {
  pval result;
  pval **_result;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  result.type = IS_NULL;
  if (_propget_DbEnv(property_reference, &result)==SUCCESS) return result;
  /* return it ourselves */
  if (zend_hash_find(Z_OBJPROP_P(property_reference->object),Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),(void**)&_result)==SUCCESS) {
  zval *_value;
  MAKE_STD_ZVAL(_value);  *_value=**_result;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return *_value;
  }
  result.type = IS_NULL;
  return result;
}
static int _propget_DbEnv(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  return FAILURE;
}

static int _wrap_propset_DbEnv(zend_property_reference *property_reference, pval *value) { 
  zval * _value;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  if (_propset_DbEnv(property_reference, value)==SUCCESS) return SUCCESS;
  /* set it ourselves as it is DbEnv */
  MAKE_STD_ZVAL(_value);
  *_value=*value;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return add_property_zval_ex(property_reference->object,Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),_value);
}
static int _propset_DbEnv(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  return FAILURE;
}

ZEND_NAMED_FUNCTION(_wrap_new_XmlContainer) {
    DbEnv *arg1 = (DbEnv *) 0 ;
    std::string *arg2 = 0 ;
    u_int32_t arg3 = (u_int32_t) 0 ;
    XmlContainer *result;
    std::string temp2 ;
    zval **args[4];
    int argbase=0 ;
    int arg_count;
    
    /* NATIVE Constructor */
    int self_constructor=1;
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<(2-argbase) || arg_count>(3-argbase))
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_DbEnv) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of new_XmlContainer. Expected %s", 1-argbase, SWIGTYPE_p_DbEnv->name);
    }
    
    {
        convert_to_string_ex(args[1-argbase]);
        temp2 = std::string(Z_STRVAL_PP(args[1-argbase]));
        arg2 = &temp2;
    }
    if(arg_count > 2) {
        convert_to_long_ex(args[2-argbase]);
        arg3 = (u_int32_t) Z_LVAL_PP(args[2-argbase]);
        
    }
    {
        try {
            result = (XmlContainer *)new XmlContainer(arg1,(std::string const &)*arg2,arg3);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_XmlContainer, 1);
    
    /* Wrap this return value */
    if (this_ptr) {
        /* NATIVE Constructor, use this_ptr */
        zval *_cPtr; MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        add_property_zval(this_ptr,"_cPtr",_cPtr);
    }else if (! this_ptr) {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_XmlContainer);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
}


/* This function is designed to be called by the zend list destructors to typecast and do the actual destruction */
void __wrap_delete_XmlContainer(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
    swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
    void *ptr=value->ptr ;
    int newobject=value->newobject ;
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    
    efree(value);
    if (! newobject) return; /* can't delete it! */
    SWIG_ZTS_ConvertResourceData(ptr,rsrc->type,type_name,(void **) &arg1,SWIGTYPE_p_XmlContainer TSRMLS_CC);
    if (! arg1) zend_error(E_ERROR, "XmlContainer resource already free'd");
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
}


ZEND_NAMED_FUNCTION(_wrap_delete_XmlContainer) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    zval **args[2];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlContainer) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of delete_XmlContainer. Expected %s", 1-argbase, SWIGTYPE_p_XmlContainer->name);
    }
    
    /*if ((*args[0])->type==IS_RESOURCE) { */
    /*  Get zend list destructor to free it */
    /*  zend_list_delete(Z_LVAL_PP(args[0])); */
    /* } else {*/
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    /*}*/
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlContainer_setPageSize) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    u_int32_t arg2 ;
    zval **args[3];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 2) || (zend_get_parameters_array_ex(2-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlContainer) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_setPageSize. Expected %s", 1-argbase, SWIGTYPE_p_XmlContainer->name);
    }
    
    
    convert_to_long_ex(args[1-argbase]);
    arg2 = (u_int32_t) Z_LVAL_PP(args[1-argbase]);
    
    {
        try {
            (arg1)->setPageSize(arg2);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlContainer_open) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    u_int32_t arg3 = (u_int32_t) 0 ;
    int arg4 = (int) 0 ;
    zval **args[5];
    int argbase=0 ;
    int arg_count;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<(2-argbase) || arg_count>(4-argbase))
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlContainer) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_open. Expected %s", 1-argbase, SWIGTYPE_p_XmlContainer->name);
    }
    
    
    if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_DbTxn) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_open. Expected %s", 2-argbase, SWIGTYPE_p_DbTxn->name);
    }
    
    if(arg_count > 2) {
        convert_to_long_ex(args[2-argbase]);
        arg3 = (u_int32_t) Z_LVAL_PP(args[2-argbase]);
        
    }
    if(arg_count > 3) {
        convert_to_long_ex(args[3-argbase]);
        arg4 = (int) Z_LVAL_PP(args[3-argbase]);
        
    }
    {
        try {
            (arg1)->open(arg2,arg3,arg4);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlContainer_exists) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    bool result;
    zval **args[3];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 2) || (zend_get_parameters_array_ex(2-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlContainer) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_exists. Expected %s", 1-argbase, SWIGTYPE_p_XmlContainer->name);
    }
    
    
    if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_DbTxn) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_exists. Expected %s", 2-argbase, SWIGTYPE_p_DbTxn->name);
    }
    
    {
        try {
            result = (bool)(arg1)->exists(arg2);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    ZVAL_BOOL(return_value,(result)?1:0);
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlContainer_isOpen) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    bool result;
    zval **args[2];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlContainer) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_isOpen. Expected %s", 1-argbase, SWIGTYPE_p_XmlContainer->name);
    }
    
    {
        try {
            result = (bool)((XmlContainer const *)arg1)->isOpen();
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    ZVAL_BOOL(return_value,(result)?1:0);
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlContainer_close) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    u_int32_t arg2 = (u_int32_t) 0 ;
    zval **args[3];
    int argbase=0 ;
    int arg_count;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<(1-argbase) || arg_count>(2-argbase))
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlContainer) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_close. Expected %s", 1-argbase, SWIGTYPE_p_XmlContainer->name);
    }
    
    if(arg_count > 1) {
        convert_to_long_ex(args[1-argbase]);
        arg2 = (u_int32_t) Z_LVAL_PP(args[1-argbase]);
        
    }
    {
        try {
            (arg1)->close(arg2);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlContainer_setIndexSpecification) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    XmlIndexSpecification *arg3 = 0 ;
    zval **args[4];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 3) || (zend_get_parameters_array_ex(3-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlContainer) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_setIndexSpecification. Expected %s", 1-argbase, SWIGTYPE_p_XmlContainer->name);
    }
    
    
    if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_DbTxn) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_setIndexSpecification. Expected %s", 2-argbase, SWIGTYPE_p_DbTxn->name);
    }
    
    
    if(SWIG_ConvertPtr(*args[2-argbase], (void **) &arg3, SWIGTYPE_p_XmlIndexSpecification) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_setIndexSpecification. Expected %s", 3-argbase, SWIGTYPE_p_XmlIndexSpecification->name);
    }
    
    {
        try {
            (arg1)->setIndexSpecification(arg2,(XmlIndexSpecification const &)*arg3);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlContainer_addIndex) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    std::string *arg3 = 0 ;
    std::string *arg4 = 0 ;
    std::string *arg5 = 0 ;
    std::string temp3 ;
    std::string temp4 ;
    std::string temp5 ;
    zval **args[6];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 5) || (zend_get_parameters_array_ex(5-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlContainer) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_addIndex. Expected %s", 1-argbase, SWIGTYPE_p_XmlContainer->name);
    }
    
    
    if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_DbTxn) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_addIndex. Expected %s", 2-argbase, SWIGTYPE_p_DbTxn->name);
    }
    
    {
        convert_to_string_ex(args[2-argbase]);
        temp3 = std::string(Z_STRVAL_PP(args[2-argbase]));
        arg3 = &temp3;
    }
    {
        convert_to_string_ex(args[3-argbase]);
        temp4 = std::string(Z_STRVAL_PP(args[3-argbase]));
        arg4 = &temp4;
    }
    {
        convert_to_string_ex(args[4-argbase]);
        temp5 = std::string(Z_STRVAL_PP(args[4-argbase]));
        arg5 = &temp5;
    }
    {
        try {
            (arg1)->addIndex(arg2,(std::string const &)*arg3,(std::string const &)*arg4,(std::string const &)*arg5);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlContainer_deleteIndex) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    std::string *arg3 = 0 ;
    std::string *arg4 = 0 ;
    std::string *arg5 = 0 ;
    std::string temp3 ;
    std::string temp4 ;
    std::string temp5 ;
    zval **args[6];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 5) || (zend_get_parameters_array_ex(5-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlContainer) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_deleteIndex. Expected %s", 1-argbase, SWIGTYPE_p_XmlContainer->name);
    }
    
    
    if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_DbTxn) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_deleteIndex. Expected %s", 2-argbase, SWIGTYPE_p_DbTxn->name);
    }
    
    {
        convert_to_string_ex(args[2-argbase]);
        temp3 = std::string(Z_STRVAL_PP(args[2-argbase]));
        arg3 = &temp3;
    }
    {
        convert_to_string_ex(args[3-argbase]);
        temp4 = std::string(Z_STRVAL_PP(args[3-argbase]));
        arg4 = &temp4;
    }
    {
        convert_to_string_ex(args[4-argbase]);
        temp5 = std::string(Z_STRVAL_PP(args[4-argbase]));
        arg5 = &temp5;
    }
    {
        try {
            (arg1)->deleteIndex(arg2,(std::string const &)*arg3,(std::string const &)*arg4,(std::string const &)*arg5);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlContainer_replaceIndex) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    std::string *arg3 = 0 ;
    std::string *arg4 = 0 ;
    std::string *arg5 = 0 ;
    std::string temp3 ;
    std::string temp4 ;
    std::string temp5 ;
    zval **args[6];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 5) || (zend_get_parameters_array_ex(5-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlContainer) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_replaceIndex. Expected %s", 1-argbase, SWIGTYPE_p_XmlContainer->name);
    }
    
    
    if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_DbTxn) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_replaceIndex. Expected %s", 2-argbase, SWIGTYPE_p_DbTxn->name);
    }
    
    {
        convert_to_string_ex(args[2-argbase]);
        temp3 = std::string(Z_STRVAL_PP(args[2-argbase]));
        arg3 = &temp3;
    }
    {
        convert_to_string_ex(args[3-argbase]);
        temp4 = std::string(Z_STRVAL_PP(args[3-argbase]));
        arg4 = &temp4;
    }
    {
        convert_to_string_ex(args[4-argbase]);
        temp5 = std::string(Z_STRVAL_PP(args[4-argbase]));
        arg5 = &temp5;
    }
    {
        try {
            (arg1)->replaceIndex(arg2,(std::string const &)*arg3,(std::string const &)*arg4,(std::string const &)*arg5);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlContainer_upgrade) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    u_int32_t arg2 = (u_int32_t) 0 ;
    zval **args[3];
    int argbase=0 ;
    int arg_count;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<(1-argbase) || arg_count>(2-argbase))
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlContainer) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_upgrade. Expected %s", 1-argbase, SWIGTYPE_p_XmlContainer->name);
    }
    
    if(arg_count > 1) {
        convert_to_long_ex(args[1-argbase]);
        arg2 = (u_int32_t) Z_LVAL_PP(args[1-argbase]);
        
    }
    {
        try {
            (arg1)->upgrade(arg2);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlContainer_getIndexSpecification) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    XmlIndexSpecification *result;
    zval **args[3];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 2) || (zend_get_parameters_array_ex(2-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlContainer) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_getIndexSpecification. Expected %s", 1-argbase, SWIGTYPE_p_XmlContainer->name);
    }
    
    
    if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_DbTxn) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_getIndexSpecification. Expected %s", 2-argbase, SWIGTYPE_p_DbTxn->name);
    }
    
    {
        try {
            result = (XmlIndexSpecification *)XmlContainer_getIndexSpecification((XmlContainer const *)arg1,arg2);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_XmlIndexSpecification, 1);
    
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_XmlIndexSpecification);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
}


ZEND_NAMED_FUNCTION(_wrap_XmlContainer_getName) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    std::string *result;
    zval **args[2];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlContainer) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_getName. Expected %s", 1-argbase, SWIGTYPE_p_XmlContainer->name);
    }
    
    {
        try {
            {
                std::string const &_result_ref = ((XmlContainer const *)arg1)->getName();
                result = (std::string *) &_result_ref;
            }
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    {
        ZVAL_STRINGL(return_value,const_cast<char*>(result->c_str()),result->length(),1);
    }
}


ZEND_NAMED_FUNCTION(_wrap_XmlContainer_setName) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    std::string *arg2 = 0 ;
    std::string temp2 ;
    zval **args[3];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 2) || (zend_get_parameters_array_ex(2-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlContainer) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_setName. Expected %s", 1-argbase, SWIGTYPE_p_XmlContainer->name);
    }
    
    {
        convert_to_string_ex(args[1-argbase]);
        temp2 = std::string(Z_STRVAL_PP(args[1-argbase]));
        arg2 = &temp2;
    }
    {
        try {
            (arg1)->setName((std::string const &)*arg2);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlContainer_putDocument) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    XmlDocument *arg3 = 0 ;
    XmlUpdateContext *arg4 = (XmlUpdateContext *) 0 ;
    u_int32_t arg5 = (u_int32_t) 0 ;
    u_int32_t result;
    zval **args[6];
    int argbase=0 ;
    int arg_count;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<(3-argbase) || arg_count>(5-argbase))
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlContainer) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_putDocument. Expected %s", 1-argbase, SWIGTYPE_p_XmlContainer->name);
    }
    
    
    if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_DbTxn) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_putDocument. Expected %s", 2-argbase, SWIGTYPE_p_DbTxn->name);
    }
    
    
    if(SWIG_ConvertPtr(*args[2-argbase], (void **) &arg3, SWIGTYPE_p_XmlDocument) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_putDocument. Expected %s", 3-argbase, SWIGTYPE_p_XmlDocument->name);
    }
    
    if(arg_count > 3) {
        if(SWIG_ConvertPtr(*args[3-argbase], (void **) &arg4, SWIGTYPE_p_XmlUpdateContext) < 0) {
            zend_error(E_ERROR, "Type error in argument %d of XmlContainer_putDocument. Expected %s", 4-argbase, SWIGTYPE_p_XmlUpdateContext->name);
        }
        
    }
    if(arg_count > 4) {
        convert_to_long_ex(args[4-argbase]);
        arg5 = (u_int32_t) Z_LVAL_PP(args[4-argbase]);
        
    }
    {
        try {
            result = (u_int32_t)(arg1)->putDocument(arg2,*arg3,arg4,arg5);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlContainer_updateDocument) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    XmlDocument *arg3 = 0 ;
    XmlUpdateContext *arg4 = (XmlUpdateContext *) 0 ;
    zval **args[5];
    int argbase=0 ;
    int arg_count;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<(3-argbase) || arg_count>(4-argbase))
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlContainer) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_updateDocument. Expected %s", 1-argbase, SWIGTYPE_p_XmlContainer->name);
    }
    
    
    if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_DbTxn) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_updateDocument. Expected %s", 2-argbase, SWIGTYPE_p_DbTxn->name);
    }
    
    
    if(SWIG_ConvertPtr(*args[2-argbase], (void **) &arg3, SWIGTYPE_p_XmlDocument) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_updateDocument. Expected %s", 3-argbase, SWIGTYPE_p_XmlDocument->name);
    }
    
    if(arg_count > 3) {
        if(SWIG_ConvertPtr(*args[3-argbase], (void **) &arg4, SWIGTYPE_p_XmlUpdateContext) < 0) {
            zend_error(E_ERROR, "Type error in argument %d of XmlContainer_updateDocument. Expected %s", 4-argbase, SWIGTYPE_p_XmlUpdateContext->name);
        }
        
    }
    {
        try {
            (arg1)->updateDocument(arg2,*arg3,arg4);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlContainer_remove) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    u_int32_t arg3 = (u_int32_t) 0 ;
    zval **args[4];
    int argbase=0 ;
    int arg_count;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<(2-argbase) || arg_count>(3-argbase))
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlContainer) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_remove. Expected %s", 1-argbase, SWIGTYPE_p_XmlContainer->name);
    }
    
    
    if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_DbTxn) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_remove. Expected %s", 2-argbase, SWIGTYPE_p_DbTxn->name);
    }
    
    if(arg_count > 2) {
        convert_to_long_ex(args[2-argbase]);
        arg3 = (u_int32_t) Z_LVAL_PP(args[2-argbase]);
        
    }
    {
        try {
            (arg1)->remove(arg2,arg3);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlContainer_rename) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    std::string *arg3 = 0 ;
    u_int32_t arg4 = (u_int32_t) 0 ;
    std::string temp3 ;
    zval **args[5];
    int argbase=0 ;
    int arg_count;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<(3-argbase) || arg_count>(4-argbase))
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlContainer) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_rename. Expected %s", 1-argbase, SWIGTYPE_p_XmlContainer->name);
    }
    
    
    if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_DbTxn) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_rename. Expected %s", 2-argbase, SWIGTYPE_p_DbTxn->name);
    }
    
    {
        convert_to_string_ex(args[2-argbase]);
        temp3 = std::string(Z_STRVAL_PP(args[2-argbase]));
        arg3 = &temp3;
    }
    if(arg_count > 3) {
        convert_to_long_ex(args[3-argbase]);
        arg4 = (u_int32_t) Z_LVAL_PP(args[3-argbase]);
        
    }
    {
        try {
            (arg1)->rename(arg2,(std::string const &)*arg3,arg4);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlContainer_deleteDocumentByID) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    u_int32_t arg3 ;
    XmlUpdateContext *arg4 = (XmlUpdateContext *) 0 ;
    u_int32_t arg5 = (u_int32_t) 0 ;
    zval **args[6];
    int argbase=0 ;
    int arg_count;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<(3-argbase) || arg_count>(5-argbase))
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlContainer) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_deleteDocumentByID. Expected %s", 1-argbase, SWIGTYPE_p_XmlContainer->name);
    }
    
    
    if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_DbTxn) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_deleteDocumentByID. Expected %s", 2-argbase, SWIGTYPE_p_DbTxn->name);
    }
    
    
    convert_to_long_ex(args[2-argbase]);
    arg3 = (u_int32_t) Z_LVAL_PP(args[2-argbase]);
    
    if(arg_count > 3) {
        if(SWIG_ConvertPtr(*args[3-argbase], (void **) &arg4, SWIGTYPE_p_XmlUpdateContext) < 0) {
            zend_error(E_ERROR, "Type error in argument %d of XmlContainer_deleteDocumentByID. Expected %s", 4-argbase, SWIGTYPE_p_XmlUpdateContext->name);
        }
        
    }
    if(arg_count > 4) {
        convert_to_long_ex(args[4-argbase]);
        arg5 = (u_int32_t) Z_LVAL_PP(args[4-argbase]);
        
    }
    {
        try {
            (arg1)->deleteDocument(arg2,arg3,arg4,arg5);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlContainer_deleteDocument) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    XmlDocument *arg3 = 0 ;
    XmlUpdateContext *arg4 = (XmlUpdateContext *) 0 ;
    u_int32_t arg5 = (u_int32_t) 0 ;
    zval **args[6];
    int argbase=0 ;
    int arg_count;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<(3-argbase) || arg_count>(5-argbase))
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlContainer) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_deleteDocument. Expected %s", 1-argbase, SWIGTYPE_p_XmlContainer->name);
    }
    
    
    if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_DbTxn) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_deleteDocument. Expected %s", 2-argbase, SWIGTYPE_p_DbTxn->name);
    }
    
    
    if(SWIG_ConvertPtr(*args[2-argbase], (void **) &arg3, SWIGTYPE_p_XmlDocument) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_deleteDocument. Expected %s", 3-argbase, SWIGTYPE_p_XmlDocument->name);
    }
    
    if(arg_count > 3) {
        if(SWIG_ConvertPtr(*args[3-argbase], (void **) &arg4, SWIGTYPE_p_XmlUpdateContext) < 0) {
            zend_error(E_ERROR, "Type error in argument %d of XmlContainer_deleteDocument. Expected %s", 4-argbase, SWIGTYPE_p_XmlUpdateContext->name);
        }
        
    }
    if(arg_count > 4) {
        convert_to_long_ex(args[4-argbase]);
        arg5 = (u_int32_t) Z_LVAL_PP(args[4-argbase]);
        
    }
    {
        try {
            (arg1)->deleteDocument(arg2,*arg3,arg4,arg5);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlContainer_modifyDocument) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    XmlModify *arg3 = 0 ;
    XmlUpdateContext *arg4 = (XmlUpdateContext *) 0 ;
    u_int32_t arg5 = (u_int32_t) 0 ;
    zval **args[6];
    int argbase=0 ;
    int arg_count;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<(3-argbase) || arg_count>(5-argbase))
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlContainer) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_modifyDocument. Expected %s", 1-argbase, SWIGTYPE_p_XmlContainer->name);
    }
    
    
    if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_DbTxn) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_modifyDocument. Expected %s", 2-argbase, SWIGTYPE_p_DbTxn->name);
    }
    
    
    if(SWIG_ConvertPtr(*args[2-argbase], (void **) &arg3, SWIGTYPE_p_XmlModify) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_modifyDocument. Expected %s", 3-argbase, SWIGTYPE_p_XmlModify->name);
    }
    
    if(arg_count > 3) {
        if(SWIG_ConvertPtr(*args[3-argbase], (void **) &arg4, SWIGTYPE_p_XmlUpdateContext) < 0) {
            zend_error(E_ERROR, "Type error in argument %d of XmlContainer_modifyDocument. Expected %s", 4-argbase, SWIGTYPE_p_XmlUpdateContext->name);
        }
        
    }
    if(arg_count > 4) {
        convert_to_long_ex(args[4-argbase]);
        arg5 = (u_int32_t) Z_LVAL_PP(args[4-argbase]);
        
    }
    {
        try {
            (arg1)->modifyDocument(arg2,*arg3,arg4,arg5);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlContainer_getDocument) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    u_int32_t arg3 ;
    u_int32_t arg4 = (u_int32_t) 0 ;
    XmlDocument *result;
    zval **args[5];
    int argbase=0 ;
    int arg_count;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<(3-argbase) || arg_count>(4-argbase))
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlContainer) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_getDocument. Expected %s", 1-argbase, SWIGTYPE_p_XmlContainer->name);
    }
    
    
    if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_DbTxn) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_getDocument. Expected %s", 2-argbase, SWIGTYPE_p_DbTxn->name);
    }
    
    
    convert_to_long_ex(args[2-argbase]);
    arg3 = (u_int32_t) Z_LVAL_PP(args[2-argbase]);
    
    if(arg_count > 3) {
        convert_to_long_ex(args[3-argbase]);
        arg4 = (u_int32_t) Z_LVAL_PP(args[3-argbase]);
        
    }
    {
        try {
            result = (XmlDocument *)XmlContainer_getDocument(arg1,arg2,arg3,arg4);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_XmlDocument, 1);
    
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_XmlDocument);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
}


ZEND_NAMED_FUNCTION(_wrap_XmlContainer_parseXPathExpression) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    std::string *arg3 = 0 ;
    XmlQueryContext *arg4 = (XmlQueryContext *) 0 ;
    XmlQueryExpression *result;
    std::string temp3 ;
    zval **args[5];
    int argbase=0 ;
    int arg_count;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<(3-argbase) || arg_count>(4-argbase))
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlContainer) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_parseXPathExpression. Expected %s", 1-argbase, SWIGTYPE_p_XmlContainer->name);
    }
    
    
    if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_DbTxn) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_parseXPathExpression. Expected %s", 2-argbase, SWIGTYPE_p_DbTxn->name);
    }
    
    {
        convert_to_string_ex(args[2-argbase]);
        temp3 = std::string(Z_STRVAL_PP(args[2-argbase]));
        arg3 = &temp3;
    }
    if(arg_count > 3) {
        if(SWIG_ConvertPtr(*args[3-argbase], (void **) &arg4, SWIGTYPE_p_XmlQueryContext) < 0) {
            zend_error(E_ERROR, "Type error in argument %d of XmlContainer_parseXPathExpression. Expected %s", 4-argbase, SWIGTYPE_p_XmlQueryContext->name);
        }
        
    }
    {
        try {
            result = (XmlQueryExpression *)XmlContainer_parseXPathExpression((XmlContainer const *)arg1,arg2,(std::string const &)*arg3,arg4);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_XmlQueryExpression, 1);
    
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_XmlQueryExpression);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
}


ZEND_NAMED_FUNCTION(_wrap_XmlContainer_queryWithXPath) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    std::string *arg3 = 0 ;
    XmlQueryContext *arg4 = (XmlQueryContext *) 0 ;
    u_int32_t arg5 = (u_int32_t) 0 ;
    XmlResults *result;
    std::string temp3 ;
    zval **args[6];
    int argbase=0 ;
    int arg_count;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<(3-argbase) || arg_count>(5-argbase))
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlContainer) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_queryWithXPath. Expected %s", 1-argbase, SWIGTYPE_p_XmlContainer->name);
    }
    
    
    if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_DbTxn) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_queryWithXPath. Expected %s", 2-argbase, SWIGTYPE_p_DbTxn->name);
    }
    
    {
        convert_to_string_ex(args[2-argbase]);
        temp3 = std::string(Z_STRVAL_PP(args[2-argbase]));
        arg3 = &temp3;
    }
    if(arg_count > 3) {
        if(SWIG_ConvertPtr(*args[3-argbase], (void **) &arg4, SWIGTYPE_p_XmlQueryContext) < 0) {
            zend_error(E_ERROR, "Type error in argument %d of XmlContainer_queryWithXPath. Expected %s", 4-argbase, SWIGTYPE_p_XmlQueryContext->name);
        }
        
    }
    if(arg_count > 4) {
        convert_to_long_ex(args[4-argbase]);
        arg5 = (u_int32_t) Z_LVAL_PP(args[4-argbase]);
        
    }
    {
        try {
            result = (XmlResults *)XmlContainer_queryWithXPath((XmlContainer const *)arg1,arg2,(std::string const &)*arg3,arg4,arg5);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_XmlResults, 1);
    
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_XmlResults);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
}


ZEND_NAMED_FUNCTION(_wrap_XmlContainer_queryWithXPathExpression) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    XmlQueryExpression *arg3 = 0 ;
    u_int32_t arg4 = (u_int32_t) 0 ;
    XmlResults *result;
    zval **args[5];
    int argbase=0 ;
    int arg_count;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<(3-argbase) || arg_count>(4-argbase))
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlContainer) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_queryWithXPathExpression. Expected %s", 1-argbase, SWIGTYPE_p_XmlContainer->name);
    }
    
    
    if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_DbTxn) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_queryWithXPathExpression. Expected %s", 2-argbase, SWIGTYPE_p_DbTxn->name);
    }
    
    
    if(SWIG_ConvertPtr(*args[2-argbase], (void **) &arg3, SWIGTYPE_p_XmlQueryExpression) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_queryWithXPathExpression. Expected %s", 3-argbase, SWIGTYPE_p_XmlQueryExpression->name);
    }
    
    if(arg_count > 3) {
        convert_to_long_ex(args[3-argbase]);
        arg4 = (u_int32_t) Z_LVAL_PP(args[3-argbase]);
        
    }
    {
        try {
            result = (XmlResults *)XmlContainer_queryWithXPath((XmlContainer const *)arg1,arg2,*arg3,arg4);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_XmlResults, 1);
    
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_XmlResults);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
}


ZEND_NAMED_FUNCTION(_wrap_XmlContainer_query) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    DbTxn *arg2 = (DbTxn *) 0 ;
    char *arg3 ;
    XmlQueryContext *arg4 = (XmlQueryContext *) 0 ;
    u_int32_t *result;
    zval **args[5];
    int argbase=0 ;
    int arg_count;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<(3-argbase) || arg_count>(4-argbase))
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlContainer) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_query. Expected %s", 1-argbase, SWIGTYPE_p_XmlContainer->name);
    }
    
    
    if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_DbTxn) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_query. Expected %s", 2-argbase, SWIGTYPE_p_DbTxn->name);
    }
    
    
    convert_to_string_ex(args[2-argbase]);
    arg3 = (char *) Z_STRVAL_PP(args[2-argbase]);
    
    if(arg_count > 3) {
        if(SWIG_ConvertPtr(*args[3-argbase], (void **) &arg4, SWIGTYPE_p_XmlQueryContext) < 0) {
            zend_error(E_ERROR, "Type error in argument %d of XmlContainer_query. Expected %s", 4-argbase, SWIGTYPE_p_XmlQueryContext->name);
        }
        
    }
    {
        try {
            result = (u_int32_t *)XmlContainer_query((XmlContainer const *)arg1,arg2,(char const *)arg3,arg4);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_u_int32_t, 1);
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlContainer_dump) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    char *arg2 ;
    u_int32_t arg3 = (u_int32_t) 0 ;
    zval **args[4];
    int argbase=0 ;
    int arg_count;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<(2-argbase) || arg_count>(3-argbase))
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlContainer) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_dump. Expected %s", 1-argbase, SWIGTYPE_p_XmlContainer->name);
    }
    
    
    convert_to_string_ex(args[1-argbase]);
    arg2 = (char *) Z_STRVAL_PP(args[1-argbase]);
    
    if(arg_count > 2) {
        convert_to_long_ex(args[2-argbase]);
        arg3 = (u_int32_t) Z_LVAL_PP(args[2-argbase]);
        
    }
    {
        try {
            XmlContainer_dump(arg1,(char const *)arg2,arg3);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlContainer_load) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    char *arg2 ;
    u_int32_t arg3 = (u_int32_t) 0 ;
    zval **args[4];
    int argbase=0 ;
    int arg_count;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<(2-argbase) || arg_count>(3-argbase))
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlContainer) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_load. Expected %s", 1-argbase, SWIGTYPE_p_XmlContainer->name);
    }
    
    
    convert_to_string_ex(args[1-argbase]);
    arg2 = (char *) Z_STRVAL_PP(args[1-argbase]);
    
    if(arg_count > 2) {
        convert_to_long_ex(args[2-argbase]);
        arg3 = (u_int32_t) Z_LVAL_PP(args[2-argbase]);
        
    }
    {
        try {
            XmlContainer_load(arg1,(char const *)arg2,arg3);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlContainer_verify) {
    XmlContainer *arg1 = (XmlContainer *) 0 ;
    char *arg2 ;
    u_int32_t arg3 = (u_int32_t) 0 ;
    zval **args[4];
    int argbase=0 ;
    int arg_count;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<(2-argbase) || arg_count>(3-argbase))
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlContainer) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlContainer_verify. Expected %s", 1-argbase, SWIGTYPE_p_XmlContainer->name);
    }
    
    
    convert_to_string_ex(args[1-argbase]);
    arg2 = (char *) Z_STRVAL_PP(args[1-argbase]);
    
    if(arg_count > 2) {
        convert_to_long_ex(args[2-argbase]);
        arg3 = (u_int32_t) Z_LVAL_PP(args[2-argbase]);
        
    }
    {
        try {
            XmlContainer_verify(arg1,(char const *)arg2,arg3);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlContainer_setLogLevel) {
    int arg1 ;
    bool arg2 ;
    zval **args[3];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 2) || (zend_get_parameters_array_ex(2-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    convert_to_long_ex(((0<argbase)?(&this_ptr):(args[0-argbase])));
    arg1 = (int) Z_LVAL_PP(((0<argbase)?(&this_ptr):(args[0-argbase])));
    
    
    convert_to_boolean_ex(args[1-argbase]);
    arg2 = (bool) Z_LVAL_PP(args[1-argbase]);
    
    {
        try {
            XmlContainer_setLogLevel((LogLevel )arg1,arg2);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlContainer_setLogCategory) {
    int arg1 ;
    bool arg2 ;
    zval **args[3];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 2) || (zend_get_parameters_array_ex(2-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    convert_to_long_ex(((0<argbase)?(&this_ptr):(args[0-argbase])));
    arg1 = (int) Z_LVAL_PP(((0<argbase)?(&this_ptr):(args[0-argbase])));
    
    
    convert_to_boolean_ex(args[1-argbase]);
    arg2 = (bool) Z_LVAL_PP(args[1-argbase]);
    
    {
        try {
            XmlContainer_setLogCategory((LogCategory )arg1,arg2);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlContainer_get_version_major) {
    int result;
    zval **args[1];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 0) || (zend_get_parameters_array_ex(0-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        try {
            result = (int)XmlContainer_get_version_major();
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlContainer_get_version_minor) {
    int result;
    zval **args[1];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 0) || (zend_get_parameters_array_ex(0-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        try {
            result = (int)XmlContainer_get_version_minor();
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlContainer_get_version_patch) {
    int result;
    zval **args[1];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 0) || (zend_get_parameters_array_ex(0-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        try {
            result = (int)XmlContainer_get_version_patch();
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlContainer_get_version_string) {
    char *result;
    zval **args[1];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 0) || (zend_get_parameters_array_ex(0-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        try {
            result = (char *)XmlContainer_get_version_string();
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    ZVAL_STRING(return_value,result, 1);
    
}


/* property handler for class XmlContainer */
static pval _wrap_propget_XmlContainer(zend_property_reference *property_reference) {
  pval result;
  pval **_result;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  result.type = IS_NULL;
  if (_propget_XmlContainer(property_reference, &result)==SUCCESS) return result;
  /* return it ourselves */
  if (zend_hash_find(Z_OBJPROP_P(property_reference->object),Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),(void**)&_result)==SUCCESS) {
  zval *_value;
  MAKE_STD_ZVAL(_value);  *_value=**_result;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return *_value;
  }
  result.type = IS_NULL;
  return result;
}
static int _propget_XmlContainer(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  return FAILURE;
}

static int _wrap_propset_XmlContainer(zend_property_reference *property_reference, pval *value) { 
  zval * _value;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  if (_propset_XmlContainer(property_reference, value)==SUCCESS) return SUCCESS;
  /* set it ourselves as it is XmlContainer */
  MAKE_STD_ZVAL(_value);
  *_value=*value;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return add_property_zval_ex(property_reference->object,Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),_value);
}
static int _propset_XmlContainer(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  return FAILURE;
}

ZEND_NAMED_FUNCTION(_wrap_new_XmlDocument) {
    XmlDocument *result;
    zval **args[1];
    int argbase=0 ;
    
    /* NATIVE Constructor */
    int self_constructor=1;
    if(((ZEND_NUM_ARGS() + argbase )!= 0) || (zend_get_parameters_array_ex(0-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        try {
            result = (XmlDocument *)new XmlDocument();
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_XmlDocument, 1);
    
    /* Wrap this return value */
    if (this_ptr) {
        /* NATIVE Constructor, use this_ptr */
        zval *_cPtr; MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        add_property_zval(this_ptr,"_cPtr",_cPtr);
    }else if (! this_ptr) {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_XmlDocument);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
}


/* This function is designed to be called by the zend list destructors to typecast and do the actual destruction */
void __wrap_delete_XmlDocument(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
    swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
    void *ptr=value->ptr ;
    int newobject=value->newobject ;
    XmlDocument *arg1 = (XmlDocument *) 0 ;
    
    efree(value);
    if (! newobject) return; /* can't delete it! */
    SWIG_ZTS_ConvertResourceData(ptr,rsrc->type,type_name,(void **) &arg1,SWIGTYPE_p_XmlDocument TSRMLS_CC);
    if (! arg1) zend_error(E_ERROR, "XmlDocument resource already free'd");
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
}


ZEND_NAMED_FUNCTION(_wrap_delete_XmlDocument) {
    XmlDocument *arg1 = (XmlDocument *) 0 ;
    zval **args[2];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlDocument) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of delete_XmlDocument. Expected %s", 1-argbase, SWIGTYPE_p_XmlDocument->name);
    }
    
    /*if ((*args[0])->type==IS_RESOURCE) { */
    /*  Get zend list destructor to free it */
    /*  zend_list_delete(Z_LVAL_PP(args[0])); */
    /* } else {*/
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    /*}*/
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlDocument_getID) {
    XmlDocument *arg1 = (XmlDocument *) 0 ;
    u_int32_t result;
    zval **args[2];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlDocument) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlDocument_getID. Expected %s", 1-argbase, SWIGTYPE_p_XmlDocument->name);
    }
    
    {
        try {
            result = (u_int32_t)((XmlDocument const *)arg1)->getID();
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlDocument_setName) {
    XmlDocument *arg1 = (XmlDocument *) 0 ;
    std::string *arg2 = 0 ;
    std::string temp2 ;
    zval **args[3];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 2) || (zend_get_parameters_array_ex(2-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlDocument) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlDocument_setName. Expected %s", 1-argbase, SWIGTYPE_p_XmlDocument->name);
    }
    
    {
        convert_to_string_ex(args[1-argbase]);
        temp2 = std::string(Z_STRVAL_PP(args[1-argbase]));
        arg2 = &temp2;
    }
    {
        try {
            (arg1)->setName((std::string const &)*arg2);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlDocument_getName) {
    XmlDocument *arg1 = (XmlDocument *) 0 ;
    std::string result;
    zval **args[2];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlDocument) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlDocument_getName. Expected %s", 1-argbase, SWIGTYPE_p_XmlDocument->name);
    }
    
    {
        try {
            result = ((XmlDocument const *)arg1)->getName();
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    {
        ZVAL_STRINGL(return_value,const_cast<char*>((&result)->c_str()),(&result)->length(),1);
    }
}


ZEND_NAMED_FUNCTION(_wrap_XmlDocument_setContent) {
    XmlDocument *arg1 = (XmlDocument *) 0 ;
    Dbt *arg2 = 0 ;
    Dbt dbt2 ;
    zval **args[3];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 2) || (zend_get_parameters_array_ex(2-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlDocument) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlDocument_setContent. Expected %s", 1-argbase, SWIGTYPE_p_XmlDocument->name);
    }
    
    {
        convert_to_string_ex(args[1-argbase]);
        dbt2.set_data(Z_STRVAL_PP(args[1-argbase]));
        dbt2.set_size(Z_STRLEN_PP(args[1-argbase]));
        arg2 = &dbt2;
    }
    {
        try {
            (arg1)->setContent(*arg2);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlDocument_getContent) {
    XmlDocument *arg1 = (XmlDocument *) 0 ;
    Dbt *result;
    zval **args[2];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlDocument) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlDocument_getContent. Expected %s", 1-argbase, SWIGTYPE_p_XmlDocument->name);
    }
    
    {
        try {
            result = (Dbt *)((XmlDocument const *)arg1)->getContent();
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    {
        if (result) {
            ZVAL_STRINGL(return_value,(char *)result->get_data(),result->get_size(), 1);
        }else {
            return_value = NULL;
        }
    }
}


ZEND_NAMED_FUNCTION(_wrap_XmlDocument_modifyDocument) {
    XmlDocument *arg1 = (XmlDocument *) 0 ;
    XmlModify *arg2 = 0 ;
    zval **args[3];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 2) || (zend_get_parameters_array_ex(2-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlDocument) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlDocument_modifyDocument. Expected %s", 1-argbase, SWIGTYPE_p_XmlDocument->name);
    }
    
    
    if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_XmlModify) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlDocument_modifyDocument. Expected %s", 2-argbase, SWIGTYPE_p_XmlModify->name);
    }
    
    {
        try {
            (arg1)->modifyDocument(*arg2);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlDocument_getContentAsString) {
    XmlDocument *arg1 = (XmlDocument *) 0 ;
    std::string result;
    zval **args[2];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlDocument) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlDocument_getContentAsString. Expected %s", 1-argbase, SWIGTYPE_p_XmlDocument->name);
    }
    
    {
        try {
            result = XmlDocument_getContentAsString((XmlDocument const *)arg1);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    {
        ZVAL_STRINGL(return_value,const_cast<char*>((&result)->c_str()),(&result)->length(),1);
    }
}


ZEND_NAMED_FUNCTION(_wrap_XmlDocument_setMetaData) {
    XmlDocument *arg1 = (XmlDocument *) 0 ;
    std::string *arg2 = 0 ;
    std::string *arg3 = 0 ;
    std::string *arg4 = 0 ;
    XmlValue *arg5 = 0 ;
    std::string temp2 ;
    std::string temp3 ;
    std::string temp4 ;
    zval **args[6];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 5) || (zend_get_parameters_array_ex(5-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlDocument) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlDocument_setMetaData. Expected %s", 1-argbase, SWIGTYPE_p_XmlDocument->name);
    }
    
    {
        convert_to_string_ex(args[1-argbase]);
        temp2 = std::string(Z_STRVAL_PP(args[1-argbase]));
        arg2 = &temp2;
    }
    {
        convert_to_string_ex(args[2-argbase]);
        temp3 = std::string(Z_STRVAL_PP(args[2-argbase]));
        arg3 = &temp3;
    }
    {
        convert_to_string_ex(args[3-argbase]);
        temp4 = std::string(Z_STRVAL_PP(args[3-argbase]));
        arg4 = &temp4;
    }
    
    if(SWIG_ConvertPtr(*args[4-argbase], (void **) &arg5, SWIGTYPE_p_XmlValue) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlDocument_setMetaData. Expected %s", 5-argbase, SWIGTYPE_p_XmlValue->name);
    }
    
    {
        try {
            (arg1)->setMetaData((std::string const &)*arg2,(std::string const &)*arg3,(std::string const &)*arg4,(XmlValue const &)*arg5);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlDocument_getMetaData) {
    XmlDocument *arg1 = (XmlDocument *) 0 ;
    std::string *arg2 = 0 ;
    std::string *arg3 = 0 ;
    XmlValue *arg4 = 0 ;
    bool result;
    std::string temp2 ;
    std::string temp3 ;
    zval **args[5];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 4) || (zend_get_parameters_array_ex(4-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlDocument) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlDocument_getMetaData. Expected %s", 1-argbase, SWIGTYPE_p_XmlDocument->name);
    }
    
    {
        convert_to_string_ex(args[1-argbase]);
        temp2 = std::string(Z_STRVAL_PP(args[1-argbase]));
        arg2 = &temp2;
    }
    {
        convert_to_string_ex(args[2-argbase]);
        temp3 = std::string(Z_STRVAL_PP(args[2-argbase]));
        arg3 = &temp3;
    }
    
    if(SWIG_ConvertPtr(*args[3-argbase], (void **) &arg4, SWIGTYPE_p_XmlValue) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlDocument_getMetaData. Expected %s", 4-argbase, SWIGTYPE_p_XmlValue->name);
    }
    
    {
        try {
            result = (bool)(arg1)->getMetaData((std::string const &)*arg2,(std::string const &)*arg3,*arg4);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    ZVAL_BOOL(return_value,(result)?1:0);
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlDocument_queryWithXPath) {
    XmlDocument *arg1 = (XmlDocument *) 0 ;
    std::string *arg2 = 0 ;
    XmlQueryContext *arg3 = (XmlQueryContext *) 0 ;
    XmlResults *result;
    std::string temp2 ;
    zval **args[4];
    int argbase=0 ;
    int arg_count;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<(2-argbase) || arg_count>(3-argbase))
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlDocument) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlDocument_queryWithXPath. Expected %s", 1-argbase, SWIGTYPE_p_XmlDocument->name);
    }
    
    {
        convert_to_string_ex(args[1-argbase]);
        temp2 = std::string(Z_STRVAL_PP(args[1-argbase]));
        arg2 = &temp2;
    }
    if(arg_count > 2) {
        if(SWIG_ConvertPtr(*args[2-argbase], (void **) &arg3, SWIGTYPE_p_XmlQueryContext) < 0) {
            zend_error(E_ERROR, "Type error in argument %d of XmlDocument_queryWithXPath. Expected %s", 3-argbase, SWIGTYPE_p_XmlQueryContext->name);
        }
        
    }
    {
        try {
            result = (XmlResults *)XmlDocument_queryWithXPath((XmlDocument const *)arg1,(std::string const &)*arg2,arg3);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_XmlResults, 1);
    
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_XmlResults);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
}


ZEND_NAMED_FUNCTION(_wrap_XmlDocument_queryWithXPathExpression) {
    XmlDocument *arg1 = (XmlDocument *) 0 ;
    XmlQueryExpression *arg2 = 0 ;
    XmlResults *result;
    zval **args[3];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 2) || (zend_get_parameters_array_ex(2-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlDocument) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlDocument_queryWithXPathExpression. Expected %s", 1-argbase, SWIGTYPE_p_XmlDocument->name);
    }
    
    
    if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_XmlQueryExpression) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlDocument_queryWithXPathExpression. Expected %s", 2-argbase, SWIGTYPE_p_XmlQueryExpression->name);
    }
    
    {
        try {
            result = (XmlResults *)XmlDocument_queryWithXPath((XmlDocument const *)arg1,*arg2);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_XmlResults, 1);
    
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_XmlResults);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
}


/* property handler for class XmlDocument */
static pval _wrap_propget_XmlDocument(zend_property_reference *property_reference) {
  pval result;
  pval **_result;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  result.type = IS_NULL;
  if (_propget_XmlDocument(property_reference, &result)==SUCCESS) return result;
  /* return it ourselves */
  if (zend_hash_find(Z_OBJPROP_P(property_reference->object),Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),(void**)&_result)==SUCCESS) {
  zval *_value;
  MAKE_STD_ZVAL(_value);  *_value=**_result;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return *_value;
  }
  result.type = IS_NULL;
  return result;
}
static int _propget_XmlDocument(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  return FAILURE;
}

static int _wrap_propset_XmlDocument(zend_property_reference *property_reference, pval *value) { 
  zval * _value;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  if (_propset_XmlDocument(property_reference, value)==SUCCESS) return SUCCESS;
  /* set it ourselves as it is XmlDocument */
  MAKE_STD_ZVAL(_value);
  *_value=*value;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return add_property_zval_ex(property_reference->object,Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),_value);
}
static int _propset_XmlDocument(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  return FAILURE;
}

ZEND_NAMED_FUNCTION(_wrap_new_XmlQueryContext) {
    int arg1 = (int) XmlQueryContext::ResultDocuments ;
    int arg2 = (int) XmlQueryContext::Eager ;
    XmlQueryContext *result;
    zval **args[3];
    int argbase=0 ;
    int arg_count;
    
    /* NATIVE Constructor */
    int self_constructor=1;
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<(0-argbase) || arg_count>(2-argbase))
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    if(arg_count > 0) {
        convert_to_long_ex(((0<argbase)?(&this_ptr):(args[0-argbase])));
        arg1 = (int) Z_LVAL_PP(((0<argbase)?(&this_ptr):(args[0-argbase])));
        
    }
    if(arg_count > 1) {
        convert_to_long_ex(args[1-argbase]);
        arg2 = (int) Z_LVAL_PP(args[1-argbase]);
        
    }
    {
        try {
            result = (XmlQueryContext *)new XmlQueryContext((XmlQueryContext::ReturnType )arg1,(XmlQueryContext::EvaluationType )arg2);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_XmlQueryContext, 1);
    
    /* Wrap this return value */
    if (this_ptr) {
        /* NATIVE Constructor, use this_ptr */
        zval *_cPtr; MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        add_property_zval(this_ptr,"_cPtr",_cPtr);
    }else if (! this_ptr) {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_XmlQueryContext);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
}


/* This function is designed to be called by the zend list destructors to typecast and do the actual destruction */
void __wrap_delete_XmlQueryContext(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
    swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
    void *ptr=value->ptr ;
    int newobject=value->newobject ;
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    
    efree(value);
    if (! newobject) return; /* can't delete it! */
    SWIG_ZTS_ConvertResourceData(ptr,rsrc->type,type_name,(void **) &arg1,SWIGTYPE_p_XmlQueryContext TSRMLS_CC);
    if (! arg1) zend_error(E_ERROR, "XmlQueryContext resource already free'd");
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
}


ZEND_NAMED_FUNCTION(_wrap_delete_XmlQueryContext) {
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    zval **args[2];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlQueryContext) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of delete_XmlQueryContext. Expected %s", 1-argbase, SWIGTYPE_p_XmlQueryContext->name);
    }
    
    /*if ((*args[0])->type==IS_RESOURCE) { */
    /*  Get zend list destructor to free it */
    /*  zend_list_delete(Z_LVAL_PP(args[0])); */
    /* } else {*/
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    /*}*/
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlQueryContext_setNamespace) {
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    std::string *arg2 = 0 ;
    std::string *arg3 = 0 ;
    std::string temp2 ;
    std::string temp3 ;
    zval **args[4];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 3) || (zend_get_parameters_array_ex(3-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlQueryContext) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlQueryContext_setNamespace. Expected %s", 1-argbase, SWIGTYPE_p_XmlQueryContext->name);
    }
    
    {
        convert_to_string_ex(args[1-argbase]);
        temp2 = std::string(Z_STRVAL_PP(args[1-argbase]));
        arg2 = &temp2;
    }
    {
        convert_to_string_ex(args[2-argbase]);
        temp3 = std::string(Z_STRVAL_PP(args[2-argbase]));
        arg3 = &temp3;
    }
    {
        try {
            (arg1)->setNamespace((std::string const &)*arg2,(std::string const &)*arg3);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlQueryContext_getNamespace) {
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    std::string *arg2 = 0 ;
    std::string result;
    std::string temp2 ;
    zval **args[3];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 2) || (zend_get_parameters_array_ex(2-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlQueryContext) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlQueryContext_getNamespace. Expected %s", 1-argbase, SWIGTYPE_p_XmlQueryContext->name);
    }
    
    {
        convert_to_string_ex(args[1-argbase]);
        temp2 = std::string(Z_STRVAL_PP(args[1-argbase]));
        arg2 = &temp2;
    }
    {
        try {
            result = (arg1)->getNamespace((std::string const &)*arg2);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    {
        ZVAL_STRINGL(return_value,const_cast<char*>((&result)->c_str()),(&result)->length(),1);
    }
}


ZEND_NAMED_FUNCTION(_wrap_XmlQueryContext_removeNamespace) {
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    std::string *arg2 = 0 ;
    std::string temp2 ;
    zval **args[3];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 2) || (zend_get_parameters_array_ex(2-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlQueryContext) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlQueryContext_removeNamespace. Expected %s", 1-argbase, SWIGTYPE_p_XmlQueryContext->name);
    }
    
    {
        convert_to_string_ex(args[1-argbase]);
        temp2 = std::string(Z_STRVAL_PP(args[1-argbase]));
        arg2 = &temp2;
    }
    {
        try {
            (arg1)->removeNamespace((std::string const &)*arg2);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlQueryContext_clearNamespaces) {
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    zval **args[2];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlQueryContext) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlQueryContext_clearNamespaces. Expected %s", 1-argbase, SWIGTYPE_p_XmlQueryContext->name);
    }
    
    {
        try {
            (arg1)->clearNamespaces();
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlQueryContext_setVariableValue) {
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    std::string *arg2 = 0 ;
    XmlValue *arg3 = 0 ;
    std::string temp2 ;
    zval **args[4];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 3) || (zend_get_parameters_array_ex(3-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlQueryContext) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlQueryContext_setVariableValue. Expected %s", 1-argbase, SWIGTYPE_p_XmlQueryContext->name);
    }
    
    {
        convert_to_string_ex(args[1-argbase]);
        temp2 = std::string(Z_STRVAL_PP(args[1-argbase]));
        arg2 = &temp2;
    }
    
    if(SWIG_ConvertPtr(*args[2-argbase], (void **) &arg3, SWIGTYPE_p_XmlValue) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlQueryContext_setVariableValue. Expected %s", 3-argbase, SWIGTYPE_p_XmlValue->name);
    }
    
    {
        try {
            (arg1)->setVariableValue((std::string const &)*arg2,(XmlValue const &)*arg3);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlQueryContext_setReturnType) {
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    int arg2 = (int) XmlQueryContext::ResultDocuments ;
    zval **args[3];
    int argbase=0 ;
    int arg_count;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<(1-argbase) || arg_count>(2-argbase))
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlQueryContext) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlQueryContext_setReturnType. Expected %s", 1-argbase, SWIGTYPE_p_XmlQueryContext->name);
    }
    
    if(arg_count > 1) {
        convert_to_long_ex(args[1-argbase]);
        arg2 = (int) Z_LVAL_PP(args[1-argbase]);
        
    }
    {
        try {
            (arg1)->setReturnType((XmlQueryContext::ReturnType )arg2);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlQueryContext_getReturnType) {
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    int result;
    zval **args[2];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlQueryContext) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlQueryContext_getReturnType. Expected %s", 1-argbase, SWIGTYPE_p_XmlQueryContext->name);
    }
    
    {
        try {
            result = (int)((XmlQueryContext const *)arg1)->getReturnType();
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlQueryContext_setEvaluationType) {
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    int arg2 = (int) XmlQueryContext::Eager ;
    zval **args[3];
    int argbase=0 ;
    int arg_count;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<(1-argbase) || arg_count>(2-argbase))
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlQueryContext) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlQueryContext_setEvaluationType. Expected %s", 1-argbase, SWIGTYPE_p_XmlQueryContext->name);
    }
    
    if(arg_count > 1) {
        convert_to_long_ex(args[1-argbase]);
        arg2 = (int) Z_LVAL_PP(args[1-argbase]);
        
    }
    {
        try {
            (arg1)->setEvaluationType((XmlQueryContext::EvaluationType )arg2);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlQueryContext_getEvaluationType) {
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    int result;
    zval **args[2];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlQueryContext) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlQueryContext_getEvaluationType. Expected %s", 1-argbase, SWIGTYPE_p_XmlQueryContext->name);
    }
    
    {
        try {
            result = (int)((XmlQueryContext const *)arg1)->getEvaluationType();
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlQueryContext_setWithMetaData) {
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    bool arg2 ;
    zval **args[3];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 2) || (zend_get_parameters_array_ex(2-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlQueryContext) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlQueryContext_setWithMetaData. Expected %s", 1-argbase, SWIGTYPE_p_XmlQueryContext->name);
    }
    
    
    convert_to_boolean_ex(args[1-argbase]);
    arg2 = (bool) Z_LVAL_PP(args[1-argbase]);
    
    {
        try {
            (arg1)->setWithMetaData(arg2);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlQueryContext_getWithMetaData) {
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    bool result;
    zval **args[2];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlQueryContext) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlQueryContext_getWithMetaData. Expected %s", 1-argbase, SWIGTYPE_p_XmlQueryContext->name);
    }
    
    {
        try {
            result = (bool)((XmlQueryContext const *)arg1)->getWithMetaData();
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    ZVAL_BOOL(return_value,(result)?1:0);
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlQueryContext_getVariableValue) {
    XmlQueryContext *arg1 = (XmlQueryContext *) 0 ;
    std::string *arg2 = 0 ;
    XmlValue *result;
    std::string temp2 ;
    zval **args[3];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 2) || (zend_get_parameters_array_ex(2-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlQueryContext) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlQueryContext_getVariableValue. Expected %s", 1-argbase, SWIGTYPE_p_XmlQueryContext->name);
    }
    
    {
        convert_to_string_ex(args[1-argbase]);
        temp2 = std::string(Z_STRVAL_PP(args[1-argbase]));
        arg2 = &temp2;
    }
    {
        try {
            result = (XmlValue *)XmlQueryContext_getVariableValue(arg1,(std::string const &)*arg2);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_XmlValue, 1);
    
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_XmlValue);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
}


/* property handler for class XmlQueryContext */
static pval _wrap_propget_XmlQueryContext(zend_property_reference *property_reference) {
  pval result;
  pval **_result;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  result.type = IS_NULL;
  if (_propget_XmlQueryContext(property_reference, &result)==SUCCESS) return result;
  /* return it ourselves */
  if (zend_hash_find(Z_OBJPROP_P(property_reference->object),Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),(void**)&_result)==SUCCESS) {
  zval *_value;
  MAKE_STD_ZVAL(_value);  *_value=**_result;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return *_value;
  }
  result.type = IS_NULL;
  return result;
}
static int _propget_XmlQueryContext(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  return FAILURE;
}

static int _wrap_propset_XmlQueryContext(zend_property_reference *property_reference, pval *value) { 
  zval * _value;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  if (_propset_XmlQueryContext(property_reference, value)==SUCCESS) return SUCCESS;
  /* set it ourselves as it is XmlQueryContext */
  MAKE_STD_ZVAL(_value);
  *_value=*value;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return add_property_zval_ex(property_reference->object,Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),_value);
}
static int _propset_XmlQueryContext(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  return FAILURE;
}

ZEND_NAMED_FUNCTION(_wrap_new_XmlResults) {
    XmlQueryContext *arg1 = 0 ;
    DbTxn *arg2 = (DbTxn *) NULL ;
    XmlResults *result;
    zval **args[3];
    int argbase=0 ;
    int arg_count;
    
    /* NATIVE Constructor */
    int self_constructor=1;
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<(1-argbase) || arg_count>(2-argbase))
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlQueryContext) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of new_XmlResults. Expected %s", 1-argbase, SWIGTYPE_p_XmlQueryContext->name);
    }
    
    if(arg_count > 1) {
        if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_DbTxn) < 0) {
            zend_error(E_ERROR, "Type error in argument %d of new_XmlResults. Expected %s", 2-argbase, SWIGTYPE_p_DbTxn->name);
        }
        
    }
    {
        try {
            result = (XmlResults *)new XmlResults(*arg1,arg2);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_XmlResults, 1);
    
    /* Wrap this return value */
    if (this_ptr) {
        /* NATIVE Constructor, use this_ptr */
        zval *_cPtr; MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        add_property_zval(this_ptr,"_cPtr",_cPtr);
    }else if (! this_ptr) {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_XmlResults);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
}


/* This function is designed to be called by the zend list destructors to typecast and do the actual destruction */
void __wrap_delete_XmlResults(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
    swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
    void *ptr=value->ptr ;
    int newobject=value->newobject ;
    XmlResults *arg1 = (XmlResults *) 0 ;
    
    efree(value);
    if (! newobject) return; /* can't delete it! */
    SWIG_ZTS_ConvertResourceData(ptr,rsrc->type,type_name,(void **) &arg1,SWIGTYPE_p_XmlResults TSRMLS_CC);
    if (! arg1) zend_error(E_ERROR, "XmlResults resource already free'd");
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
}


ZEND_NAMED_FUNCTION(_wrap_delete_XmlResults) {
    XmlResults *arg1 = (XmlResults *) 0 ;
    zval **args[2];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlResults) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of delete_XmlResults. Expected %s", 1-argbase, SWIGTYPE_p_XmlResults->name);
    }
    
    /*if ((*args[0])->type==IS_RESOURCE) { */
    /*  Get zend list destructor to free it */
    /*  zend_list_delete(Z_LVAL_PP(args[0])); */
    /* } else {*/
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    /*}*/
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlResults_next) {
    XmlResults *arg1 = (XmlResults *) 0 ;
    XmlValue *result;
    zval **args[2];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlResults) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlResults_next. Expected %s", 1-argbase, SWIGTYPE_p_XmlResults->name);
    }
    
    {
        try {
            result = (XmlValue *)XmlResults_next(arg1);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_XmlValue, 0);
    
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_XmlValue);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
}


ZEND_NAMED_FUNCTION(_wrap_XmlResults_nextDocument) {
    XmlResults *arg1 = (XmlResults *) 0 ;
    XmlDocument *arg2 = 0 ;
    bool result;
    zval **args[3];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 2) || (zend_get_parameters_array_ex(2-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlResults) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlResults_nextDocument. Expected %s", 1-argbase, SWIGTYPE_p_XmlResults->name);
    }
    
    
    if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_XmlDocument) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlResults_nextDocument. Expected %s", 2-argbase, SWIGTYPE_p_XmlDocument->name);
    }
    
    {
        try {
            result = (bool)XmlResults_nextDocument(arg1,*arg2);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    ZVAL_BOOL(return_value,(result)?1:0);
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlResults_nextDocumentAndValue) {
    XmlResults *arg1 = (XmlResults *) 0 ;
    XmlDocument *arg2 = 0 ;
    XmlValue *arg3 = 0 ;
    bool result;
    zval **args[4];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 3) || (zend_get_parameters_array_ex(3-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlResults) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlResults_nextDocumentAndValue. Expected %s", 1-argbase, SWIGTYPE_p_XmlResults->name);
    }
    
    
    if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_XmlDocument) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlResults_nextDocumentAndValue. Expected %s", 2-argbase, SWIGTYPE_p_XmlDocument->name);
    }
    
    
    if(SWIG_ConvertPtr(*args[2-argbase], (void **) &arg3, SWIGTYPE_p_XmlValue) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlResults_nextDocumentAndValue. Expected %s", 3-argbase, SWIGTYPE_p_XmlValue->name);
    }
    
    {
        try {
            result = (bool)XmlResults_nextDocumentAndValue(arg1,*arg2,*arg3);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    ZVAL_BOOL(return_value,(result)?1:0);
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlResults_reset) {
    XmlResults *arg1 = (XmlResults *) 0 ;
    zval **args[2];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlResults) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlResults_reset. Expected %s", 1-argbase, SWIGTYPE_p_XmlResults->name);
    }
    
    {
        try {
            (arg1)->reset();
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlResults_size) {
    XmlResults *arg1 = (XmlResults *) 0 ;
    size_t result;
    zval **args[2];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlResults) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlResults_size. Expected %s", 1-argbase, SWIGTYPE_p_XmlResults->name);
    }
    
    {
        try {
            result = ((XmlResults const *)arg1)->size();
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlResults_add) {
    XmlResults *arg1 = (XmlResults *) 0 ;
    XmlValue *arg2 = 0 ;
    zval **args[3];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 2) || (zend_get_parameters_array_ex(2-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlResults) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlResults_add. Expected %s", 1-argbase, SWIGTYPE_p_XmlResults->name);
    }
    
    
    if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_XmlValue) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlResults_add. Expected %s", 2-argbase, SWIGTYPE_p_XmlValue->name);
    }
    
    {
        try {
            (arg1)->add((XmlValue const &)*arg2);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


/* property handler for class XmlResults */
static pval _wrap_propget_XmlResults(zend_property_reference *property_reference) {
  pval result;
  pval **_result;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  result.type = IS_NULL;
  if (_propget_XmlResults(property_reference, &result)==SUCCESS) return result;
  /* return it ourselves */
  if (zend_hash_find(Z_OBJPROP_P(property_reference->object),Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),(void**)&_result)==SUCCESS) {
  zval *_value;
  MAKE_STD_ZVAL(_value);  *_value=**_result;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return *_value;
  }
  result.type = IS_NULL;
  return result;
}
static int _propget_XmlResults(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  return FAILURE;
}

static int _wrap_propset_XmlResults(zend_property_reference *property_reference, pval *value) { 
  zval * _value;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  if (_propset_XmlResults(property_reference, value)==SUCCESS) return SUCCESS;
  /* set it ourselves as it is XmlResults */
  MAKE_STD_ZVAL(_value);
  *_value=*value;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return add_property_zval_ex(property_reference->object,Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),_value);
}
static int _propset_XmlResults(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  return FAILURE;
}

ZEND_NAMED_FUNCTION(_wrap_new_XmlUpdateContext) {
    XmlContainer *arg1 = 0 ;
    XmlUpdateContext *result;
    zval **args[2];
    int argbase=0 ;
    
    /* NATIVE Constructor */
    int self_constructor=1;
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlContainer) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of new_XmlUpdateContext. Expected %s", 1-argbase, SWIGTYPE_p_XmlContainer->name);
    }
    
    {
        try {
            result = (XmlUpdateContext *)new XmlUpdateContext(*arg1);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_XmlUpdateContext, 1);
    
    /* Wrap this return value */
    if (this_ptr) {
        /* NATIVE Constructor, use this_ptr */
        zval *_cPtr; MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        add_property_zval(this_ptr,"_cPtr",_cPtr);
    }else if (! this_ptr) {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_XmlUpdateContext);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
}


/* This function is designed to be called by the zend list destructors to typecast and do the actual destruction */
void __wrap_delete_XmlUpdateContext(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
    swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
    void *ptr=value->ptr ;
    int newobject=value->newobject ;
    XmlUpdateContext *arg1 = (XmlUpdateContext *) 0 ;
    
    efree(value);
    if (! newobject) return; /* can't delete it! */
    SWIG_ZTS_ConvertResourceData(ptr,rsrc->type,type_name,(void **) &arg1,SWIGTYPE_p_XmlUpdateContext TSRMLS_CC);
    if (! arg1) zend_error(E_ERROR, "XmlUpdateContext resource already free'd");
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
}


ZEND_NAMED_FUNCTION(_wrap_delete_XmlUpdateContext) {
    XmlUpdateContext *arg1 = (XmlUpdateContext *) 0 ;
    zval **args[2];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlUpdateContext) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of delete_XmlUpdateContext. Expected %s", 1-argbase, SWIGTYPE_p_XmlUpdateContext->name);
    }
    
    /*if ((*args[0])->type==IS_RESOURCE) { */
    /*  Get zend list destructor to free it */
    /*  zend_list_delete(Z_LVAL_PP(args[0])); */
    /* } else {*/
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    /*}*/
    
}


/* property handler for class XmlUpdateContext */
static pval _wrap_propget_XmlUpdateContext(zend_property_reference *property_reference) {
  pval result;
  pval **_result;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  result.type = IS_NULL;
  if (_propget_XmlUpdateContext(property_reference, &result)==SUCCESS) return result;
  /* return it ourselves */
  if (zend_hash_find(Z_OBJPROP_P(property_reference->object),Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),(void**)&_result)==SUCCESS) {
  zval *_value;
  MAKE_STD_ZVAL(_value);  *_value=**_result;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return *_value;
  }
  result.type = IS_NULL;
  return result;
}
static int _propget_XmlUpdateContext(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  return FAILURE;
}

static int _wrap_propset_XmlUpdateContext(zend_property_reference *property_reference, pval *value) { 
  zval * _value;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  if (_propset_XmlUpdateContext(property_reference, value)==SUCCESS) return SUCCESS;
  /* set it ourselves as it is XmlUpdateContext */
  MAKE_STD_ZVAL(_value);
  *_value=*value;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return add_property_zval_ex(property_reference->object,Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),_value);
}
static int _propset_XmlUpdateContext(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  return FAILURE;
}

ZEND_NAMED_FUNCTION(_wrap_new_XmlValue) {
    XmlValue *result;
    zval **args[1];
    int argbase=0 ;
    
    /* NATIVE Constructor */
    int self_constructor=1;
    if(((ZEND_NUM_ARGS() + argbase )!= 0) || (zend_get_parameters_array_ex(0-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        try {
            result = (XmlValue *)new XmlValue();
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_XmlValue, 1);
    
    /* Wrap this return value */
    if (this_ptr) {
        /* NATIVE Constructor, use this_ptr */
        zval *_cPtr; MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        add_property_zval(this_ptr,"_cPtr",_cPtr);
    }else if (! this_ptr) {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_XmlValue);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
}


ZEND_NAMED_FUNCTION(_wrap_new_XmlValueFromDoc) {
    XmlDocument *arg1 = 0 ;
    XmlValue *result;
    zval **args[2];
    int argbase=0 ;
    
    /* ALTERNATIVE Constructor */
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlDocument) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of new_XmlValueFromDoc. Expected %s", 1-argbase, SWIGTYPE_p_XmlDocument->name);
    }
    
    {
        try {
            result = (XmlValue *)new XmlValue(*arg1);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_XmlValue, 1);
    
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_XmlValue);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
}


ZEND_NAMED_FUNCTION(_wrap_new_XmlValueFromDouble) {
    double arg1 ;
    XmlValue *result;
    zval **args[2];
    int argbase=0 ;
    
    /* ALTERNATIVE Constructor */
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    convert_to_double_ex(((0<argbase)?(&this_ptr):(args[0-argbase])));
    arg1 = (double) Z_DVAL_PP(((0<argbase)?(&this_ptr):(args[0-argbase])));
    
    {
        try {
            result = (XmlValue *)new XmlValue(arg1);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_XmlValue, 1);
    
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_XmlValue);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
}


ZEND_NAMED_FUNCTION(_wrap_new_XmlValueFromChar) {
    char *arg1 ;
    XmlValue *result;
    zval **args[2];
    int argbase=0 ;
    
    /* ALTERNATIVE Constructor */
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    convert_to_string_ex(((0<argbase)?(&this_ptr):(args[0-argbase])));
    arg1 = (char *) Z_STRVAL_PP(((0<argbase)?(&this_ptr):(args[0-argbase])));
    
    {
        try {
            result = (XmlValue *)new XmlValue((char const *)arg1);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_XmlValue, 1);
    
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_XmlValue);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
}


ZEND_NAMED_FUNCTION(_wrap_new_XmlValueFromBool) {
    bool arg1 ;
    XmlValue *result;
    zval **args[2];
    int argbase=0 ;
    
    /* ALTERNATIVE Constructor */
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    convert_to_boolean_ex(((0<argbase)?(&this_ptr):(args[0-argbase])));
    arg1 = (bool) Z_LVAL_PP(((0<argbase)?(&this_ptr):(args[0-argbase])));
    
    {
        try {
            result = (XmlValue *)new XmlValue(arg1);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_XmlValue, 1);
    
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_XmlValue);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
}


ZEND_NAMED_FUNCTION(_wrap_new_XmlValueFromNamedType) {
    int arg1 ;
    char *arg2 ;
    XmlValue *result;
    zval **args[3];
    int argbase=0 ;
    
    /* ALTERNATIVE Constructor */
    if(((ZEND_NUM_ARGS() + argbase )!= 2) || (zend_get_parameters_array_ex(2-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    convert_to_long_ex(((0<argbase)?(&this_ptr):(args[0-argbase])));
    arg1 = (int) Z_LVAL_PP(((0<argbase)?(&this_ptr):(args[0-argbase])));
    
    
    convert_to_string_ex(args[1-argbase]);
    arg2 = (char *) Z_STRVAL_PP(args[1-argbase]);
    
    {
        try {
            result = (XmlValue *)new XmlValue((XmlValue::Type )arg1,(char const *)arg2);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_XmlValue, 1);
    
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_XmlValue);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
}


/* This function is designed to be called by the zend list destructors to typecast and do the actual destruction */
void __wrap_delete_XmlValue(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
    swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
    void *ptr=value->ptr ;
    int newobject=value->newobject ;
    XmlValue *arg1 = (XmlValue *) 0 ;
    
    efree(value);
    if (! newobject) return; /* can't delete it! */
    SWIG_ZTS_ConvertResourceData(ptr,rsrc->type,type_name,(void **) &arg1,SWIGTYPE_p_XmlValue TSRMLS_CC);
    if (! arg1) zend_error(E_ERROR, "XmlValue resource already free'd");
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
}


ZEND_NAMED_FUNCTION(_wrap_delete_XmlValue) {
    XmlValue *arg1 = (XmlValue *) 0 ;
    zval **args[2];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlValue) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of delete_XmlValue. Expected %s", 1-argbase, SWIGTYPE_p_XmlValue->name);
    }
    
    /*if ((*args[0])->type==IS_RESOURCE) { */
    /*  Get zend list destructor to free it */
    /*  zend_list_delete(Z_LVAL_PP(args[0])); */
    /* } else {*/
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    /*}*/
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlValue_getType) {
    XmlValue *arg1 = (XmlValue *) 0 ;
    XmlQueryContext *arg2 = (XmlQueryContext *) 0 ;
    int result;
    zval **args[3];
    int argbase=0 ;
    int arg_count;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<(1-argbase) || arg_count>(2-argbase))
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlValue) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlValue_getType. Expected %s", 1-argbase, SWIGTYPE_p_XmlValue->name);
    }
    
    if(arg_count > 1) {
        if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_XmlQueryContext) < 0) {
            zend_error(E_ERROR, "Type error in argument %d of XmlValue_getType. Expected %s", 2-argbase, SWIGTYPE_p_XmlQueryContext->name);
        }
        
    }
    {
        try {
            result = (int)((XmlValue const *)arg1)->getType((XmlQueryContext const *)arg2);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    ZVAL_LONG(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlValue_isNumber) {
    XmlValue *arg1 = (XmlValue *) 0 ;
    XmlQueryContext *arg2 = (XmlQueryContext *) 0 ;
    bool result;
    zval **args[3];
    int argbase=0 ;
    int arg_count;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<(1-argbase) || arg_count>(2-argbase))
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlValue) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlValue_isNumber. Expected %s", 1-argbase, SWIGTYPE_p_XmlValue->name);
    }
    
    if(arg_count > 1) {
        if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_XmlQueryContext) < 0) {
            zend_error(E_ERROR, "Type error in argument %d of XmlValue_isNumber. Expected %s", 2-argbase, SWIGTYPE_p_XmlQueryContext->name);
        }
        
    }
    {
        try {
            result = (bool)((XmlValue const *)arg1)->isNumber((XmlQueryContext const *)arg2);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    ZVAL_BOOL(return_value,(result)?1:0);
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlValue_isString) {
    XmlValue *arg1 = (XmlValue *) 0 ;
    XmlQueryContext *arg2 = (XmlQueryContext *) 0 ;
    bool result;
    zval **args[3];
    int argbase=0 ;
    int arg_count;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<(1-argbase) || arg_count>(2-argbase))
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlValue) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlValue_isString. Expected %s", 1-argbase, SWIGTYPE_p_XmlValue->name);
    }
    
    if(arg_count > 1) {
        if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_XmlQueryContext) < 0) {
            zend_error(E_ERROR, "Type error in argument %d of XmlValue_isString. Expected %s", 2-argbase, SWIGTYPE_p_XmlQueryContext->name);
        }
        
    }
    {
        try {
            result = (bool)((XmlValue const *)arg1)->isString((XmlQueryContext const *)arg2);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    ZVAL_BOOL(return_value,(result)?1:0);
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlValue_isBoolean) {
    XmlValue *arg1 = (XmlValue *) 0 ;
    XmlQueryContext *arg2 = (XmlQueryContext *) 0 ;
    bool result;
    zval **args[3];
    int argbase=0 ;
    int arg_count;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<(1-argbase) || arg_count>(2-argbase))
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlValue) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlValue_isBoolean. Expected %s", 1-argbase, SWIGTYPE_p_XmlValue->name);
    }
    
    if(arg_count > 1) {
        if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_XmlQueryContext) < 0) {
            zend_error(E_ERROR, "Type error in argument %d of XmlValue_isBoolean. Expected %s", 2-argbase, SWIGTYPE_p_XmlQueryContext->name);
        }
        
    }
    {
        try {
            result = (bool)((XmlValue const *)arg1)->isBoolean((XmlQueryContext const *)arg2);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    ZVAL_BOOL(return_value,(result)?1:0);
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlValue_isNode) {
    XmlValue *arg1 = (XmlValue *) 0 ;
    XmlQueryContext *arg2 = (XmlQueryContext *) 0 ;
    bool result;
    zval **args[3];
    int argbase=0 ;
    int arg_count;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<(1-argbase) || arg_count>(2-argbase))
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlValue) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlValue_isNode. Expected %s", 1-argbase, SWIGTYPE_p_XmlValue->name);
    }
    
    if(arg_count > 1) {
        if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_XmlQueryContext) < 0) {
            zend_error(E_ERROR, "Type error in argument %d of XmlValue_isNode. Expected %s", 2-argbase, SWIGTYPE_p_XmlQueryContext->name);
        }
        
    }
    {
        try {
            result = (bool)((XmlValue const *)arg1)->isNode((XmlQueryContext const *)arg2);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    ZVAL_BOOL(return_value,(result)?1:0);
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlValue_isDocument) {
    XmlValue *arg1 = (XmlValue *) 0 ;
    XmlQueryContext *arg2 = (XmlQueryContext *) 0 ;
    bool result;
    zval **args[3];
    int argbase=0 ;
    int arg_count;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<(1-argbase) || arg_count>(2-argbase))
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlValue) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlValue_isDocument. Expected %s", 1-argbase, SWIGTYPE_p_XmlValue->name);
    }
    
    if(arg_count > 1) {
        if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_XmlQueryContext) < 0) {
            zend_error(E_ERROR, "Type error in argument %d of XmlValue_isDocument. Expected %s", 2-argbase, SWIGTYPE_p_XmlQueryContext->name);
        }
        
    }
    {
        try {
            result = (bool)((XmlValue const *)arg1)->isDocument((XmlQueryContext const *)arg2);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    ZVAL_BOOL(return_value,(result)?1:0);
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlValue_isVariable) {
    XmlValue *arg1 = (XmlValue *) 0 ;
    XmlQueryContext *arg2 = (XmlQueryContext *) 0 ;
    bool result;
    zval **args[3];
    int argbase=0 ;
    int arg_count;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<(1-argbase) || arg_count>(2-argbase))
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlValue) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlValue_isVariable. Expected %s", 1-argbase, SWIGTYPE_p_XmlValue->name);
    }
    
    if(arg_count > 1) {
        if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_XmlQueryContext) < 0) {
            zend_error(E_ERROR, "Type error in argument %d of XmlValue_isVariable. Expected %s", 2-argbase, SWIGTYPE_p_XmlQueryContext->name);
        }
        
    }
    {
        try {
            result = (bool)((XmlValue const *)arg1)->isVariable((XmlQueryContext const *)arg2);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    ZVAL_BOOL(return_value,(result)?1:0);
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlValue_isNull) {
    XmlValue *arg1 = (XmlValue *) 0 ;
    bool result;
    zval **args[2];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlValue) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlValue_isNull. Expected %s", 1-argbase, SWIGTYPE_p_XmlValue->name);
    }
    
    {
        try {
            result = (bool)((XmlValue const *)arg1)->isNull();
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    ZVAL_BOOL(return_value,(result)?1:0);
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlValue_asNumber) {
    XmlValue *arg1 = (XmlValue *) 0 ;
    XmlQueryContext *arg2 = (XmlQueryContext *) 0 ;
    double result;
    zval **args[3];
    int argbase=0 ;
    int arg_count;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<(1-argbase) || arg_count>(2-argbase))
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlValue) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlValue_asNumber. Expected %s", 1-argbase, SWIGTYPE_p_XmlValue->name);
    }
    
    if(arg_count > 1) {
        if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_XmlQueryContext) < 0) {
            zend_error(E_ERROR, "Type error in argument %d of XmlValue_asNumber. Expected %s", 2-argbase, SWIGTYPE_p_XmlQueryContext->name);
        }
        
    }
    {
        try {
            result = (double)((XmlValue const *)arg1)->asNumber((XmlQueryContext const *)arg2);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    ZVAL_DOUBLE(return_value,result);
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlValue_asString) {
    XmlValue *arg1 = (XmlValue *) 0 ;
    XmlQueryContext *arg2 = (XmlQueryContext *) 0 ;
    std::string result;
    zval **args[3];
    int argbase=0 ;
    int arg_count;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<(1-argbase) || arg_count>(2-argbase))
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlValue) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlValue_asString. Expected %s", 1-argbase, SWIGTYPE_p_XmlValue->name);
    }
    
    if(arg_count > 1) {
        if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_XmlQueryContext) < 0) {
            zend_error(E_ERROR, "Type error in argument %d of XmlValue_asString. Expected %s", 2-argbase, SWIGTYPE_p_XmlQueryContext->name);
        }
        
    }
    {
        try {
            result = ((XmlValue const *)arg1)->asString((XmlQueryContext const *)arg2);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    {
        ZVAL_STRINGL(return_value,const_cast<char*>((&result)->c_str()),(&result)->length(),1);
    }
}


ZEND_NAMED_FUNCTION(_wrap_XmlValue_asBoolean) {
    XmlValue *arg1 = (XmlValue *) 0 ;
    XmlQueryContext *arg2 = (XmlQueryContext *) 0 ;
    bool result;
    zval **args[3];
    int argbase=0 ;
    int arg_count;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<(1-argbase) || arg_count>(2-argbase))
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlValue) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlValue_asBoolean. Expected %s", 1-argbase, SWIGTYPE_p_XmlValue->name);
    }
    
    if(arg_count > 1) {
        if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_XmlQueryContext) < 0) {
            zend_error(E_ERROR, "Type error in argument %d of XmlValue_asBoolean. Expected %s", 2-argbase, SWIGTYPE_p_XmlQueryContext->name);
        }
        
    }
    {
        try {
            result = (bool)((XmlValue const *)arg1)->asBoolean((XmlQueryContext const *)arg2);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    ZVAL_BOOL(return_value,(result)?1:0);
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlValue_asDocument) {
    XmlValue *arg1 = (XmlValue *) 0 ;
    XmlQueryContext *arg2 = (XmlQueryContext *) 0 ;
    XmlDocument result;
    zval **args[3];
    int argbase=0 ;
    int arg_count;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<(1-argbase) || arg_count>(2-argbase))
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlValue) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlValue_asDocument. Expected %s", 1-argbase, SWIGTYPE_p_XmlValue->name);
    }
    
    if(arg_count > 1) {
        if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_XmlQueryContext) < 0) {
            zend_error(E_ERROR, "Type error in argument %d of XmlValue_asDocument. Expected %s", 2-argbase, SWIGTYPE_p_XmlQueryContext->name);
        }
        
    }
    {
        try {
            result = ((XmlValue const *)arg1)->asDocument((XmlQueryContext const *)arg2);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    {
        XmlDocument * resultobj = new XmlDocument((XmlDocument &) result);
        SWIG_SetPointerZval(return_value, (void *)resultobj, SWIGTYPE_p_XmlDocument, 0);
    }
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_XmlDocument);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
}


ZEND_NAMED_FUNCTION(_wrap_XmlValue_equals) {
    XmlValue *arg1 = (XmlValue *) 0 ;
    XmlValue *arg2 = 0 ;
    XmlQueryContext *arg3 = (XmlQueryContext *) 0 ;
    bool result;
    zval **args[4];
    int argbase=0 ;
    int arg_count;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<(2-argbase) || arg_count>(3-argbase))
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlValue) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlValue_equals. Expected %s", 1-argbase, SWIGTYPE_p_XmlValue->name);
    }
    
    
    if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_XmlValue) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlValue_equals. Expected %s", 2-argbase, SWIGTYPE_p_XmlValue->name);
    }
    
    if(arg_count > 2) {
        if(SWIG_ConvertPtr(*args[2-argbase], (void **) &arg3, SWIGTYPE_p_XmlQueryContext) < 0) {
            zend_error(E_ERROR, "Type error in argument %d of XmlValue_equals. Expected %s", 3-argbase, SWIGTYPE_p_XmlQueryContext->name);
        }
        
    }
    {
        try {
            result = (bool)((XmlValue const *)arg1)->equals((XmlValue const &)*arg2,(XmlQueryContext const *)arg3);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    ZVAL_BOOL(return_value,(result)?1:0);
    
}


/* property handler for class XmlValue */
static pval _wrap_propget_XmlValue(zend_property_reference *property_reference) {
  pval result;
  pval **_result;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  result.type = IS_NULL;
  if (_propget_XmlValue(property_reference, &result)==SUCCESS) return result;
  /* return it ourselves */
  if (zend_hash_find(Z_OBJPROP_P(property_reference->object),Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),(void**)&_result)==SUCCESS) {
  zval *_value;
  MAKE_STD_ZVAL(_value);  *_value=**_result;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return *_value;
  }
  result.type = IS_NULL;
  return result;
}
static int _propget_XmlValue(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  return FAILURE;
}

static int _wrap_propset_XmlValue(zend_property_reference *property_reference, pval *value) { 
  zval * _value;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  if (_propset_XmlValue(property_reference, value)==SUCCESS) return SUCCESS;
  /* set it ourselves as it is XmlValue */
  MAKE_STD_ZVAL(_value);
  *_value=*value;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return add_property_zval_ex(property_reference->object,Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),_value);
}
static int _propset_XmlValue(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  return FAILURE;
}

ZEND_NAMED_FUNCTION(_wrap_new_XmlIndexSpecification) {
    XmlIndexSpecification *result;
    zval **args[1];
    int argbase=0 ;
    
    /* NATIVE Constructor */
    int self_constructor=1;
    if(((ZEND_NUM_ARGS() + argbase )!= 0) || (zend_get_parameters_array_ex(0-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        try {
            result = (XmlIndexSpecification *)new XmlIndexSpecification();
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_XmlIndexSpecification, 1);
    
    /* Wrap this return value */
    if (this_ptr) {
        /* NATIVE Constructor, use this_ptr */
        zval *_cPtr; MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        add_property_zval(this_ptr,"_cPtr",_cPtr);
    }else if (! this_ptr) {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_XmlIndexSpecification);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
}


/* This function is designed to be called by the zend list destructors to typecast and do the actual destruction */
void __wrap_delete_XmlIndexSpecification(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
    swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
    void *ptr=value->ptr ;
    int newobject=value->newobject ;
    XmlIndexSpecification *arg1 = (XmlIndexSpecification *) 0 ;
    
    efree(value);
    if (! newobject) return; /* can't delete it! */
    SWIG_ZTS_ConvertResourceData(ptr,rsrc->type,type_name,(void **) &arg1,SWIGTYPE_p_XmlIndexSpecification TSRMLS_CC);
    if (! arg1) zend_error(E_ERROR, "XmlIndexSpecification resource already free'd");
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
}


ZEND_NAMED_FUNCTION(_wrap_delete_XmlIndexSpecification) {
    XmlIndexSpecification *arg1 = (XmlIndexSpecification *) 0 ;
    zval **args[2];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlIndexSpecification) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of delete_XmlIndexSpecification. Expected %s", 1-argbase, SWIGTYPE_p_XmlIndexSpecification->name);
    }
    
    /*if ((*args[0])->type==IS_RESOURCE) { */
    /*  Get zend list destructor to free it */
    /*  zend_list_delete(Z_LVAL_PP(args[0])); */
    /* } else {*/
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    /*}*/
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlIndexSpecification_addIndex) {
    XmlIndexSpecification *arg1 = (XmlIndexSpecification *) 0 ;
    std::string *arg2 = 0 ;
    std::string *arg3 = 0 ;
    std::string *arg4 = 0 ;
    std::string temp2 ;
    std::string temp3 ;
    std::string temp4 ;
    zval **args[5];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 4) || (zend_get_parameters_array_ex(4-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlIndexSpecification) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlIndexSpecification_addIndex. Expected %s", 1-argbase, SWIGTYPE_p_XmlIndexSpecification->name);
    }
    
    {
        convert_to_string_ex(args[1-argbase]);
        temp2 = std::string(Z_STRVAL_PP(args[1-argbase]));
        arg2 = &temp2;
    }
    {
        convert_to_string_ex(args[2-argbase]);
        temp3 = std::string(Z_STRVAL_PP(args[2-argbase]));
        arg3 = &temp3;
    }
    {
        convert_to_string_ex(args[3-argbase]);
        temp4 = std::string(Z_STRVAL_PP(args[3-argbase]));
        arg4 = &temp4;
    }
    {
        try {
            (arg1)->addIndex((std::string const &)*arg2,(std::string const &)*arg3,(std::string const &)*arg4);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlIndexSpecification_deleteIndex) {
    XmlIndexSpecification *arg1 = (XmlIndexSpecification *) 0 ;
    std::string *arg2 = 0 ;
    std::string *arg3 = 0 ;
    std::string *arg4 = 0 ;
    std::string temp2 ;
    std::string temp3 ;
    std::string temp4 ;
    zval **args[5];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 4) || (zend_get_parameters_array_ex(4-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlIndexSpecification) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlIndexSpecification_deleteIndex. Expected %s", 1-argbase, SWIGTYPE_p_XmlIndexSpecification->name);
    }
    
    {
        convert_to_string_ex(args[1-argbase]);
        temp2 = std::string(Z_STRVAL_PP(args[1-argbase]));
        arg2 = &temp2;
    }
    {
        convert_to_string_ex(args[2-argbase]);
        temp3 = std::string(Z_STRVAL_PP(args[2-argbase]));
        arg3 = &temp3;
    }
    {
        convert_to_string_ex(args[3-argbase]);
        temp4 = std::string(Z_STRVAL_PP(args[3-argbase]));
        arg4 = &temp4;
    }
    {
        try {
            (arg1)->deleteIndex((std::string const &)*arg2,(std::string const &)*arg3,(std::string const &)*arg4);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlIndexSpecification_replaceIndex) {
    XmlIndexSpecification *arg1 = (XmlIndexSpecification *) 0 ;
    std::string *arg2 = 0 ;
    std::string *arg3 = 0 ;
    std::string *arg4 = 0 ;
    std::string temp2 ;
    std::string temp3 ;
    std::string temp4 ;
    zval **args[5];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 4) || (zend_get_parameters_array_ex(4-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlIndexSpecification) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlIndexSpecification_replaceIndex. Expected %s", 1-argbase, SWIGTYPE_p_XmlIndexSpecification->name);
    }
    
    {
        convert_to_string_ex(args[1-argbase]);
        temp2 = std::string(Z_STRVAL_PP(args[1-argbase]));
        arg2 = &temp2;
    }
    {
        convert_to_string_ex(args[2-argbase]);
        temp3 = std::string(Z_STRVAL_PP(args[2-argbase]));
        arg3 = &temp3;
    }
    {
        convert_to_string_ex(args[3-argbase]);
        temp4 = std::string(Z_STRVAL_PP(args[3-argbase]));
        arg4 = &temp4;
    }
    {
        try {
            (arg1)->replaceIndex((std::string const &)*arg2,(std::string const &)*arg3,(std::string const &)*arg4);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlIndexSpecification_reset) {
    XmlIndexSpecification *arg1 = (XmlIndexSpecification *) 0 ;
    zval **args[2];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlIndexSpecification) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlIndexSpecification_reset. Expected %s", 1-argbase, SWIGTYPE_p_XmlIndexSpecification->name);
    }
    
    {
        try {
            (arg1)->reset();
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlIndexSpecification_find) {
    XmlIndexSpecification *arg1 = (XmlIndexSpecification *) 0 ;
    std::string *arg2 = 0 ;
    std::string *arg3 = 0 ;
    XmlIndexDeclaration *result;
    std::string temp2 ;
    std::string temp3 ;
    zval **args[4];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 3) || (zend_get_parameters_array_ex(3-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlIndexSpecification) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlIndexSpecification_find. Expected %s", 1-argbase, SWIGTYPE_p_XmlIndexSpecification->name);
    }
    
    {
        convert_to_string_ex(args[1-argbase]);
        temp2 = std::string(Z_STRVAL_PP(args[1-argbase]));
        arg2 = &temp2;
    }
    {
        convert_to_string_ex(args[2-argbase]);
        temp3 = std::string(Z_STRVAL_PP(args[2-argbase]));
        arg3 = &temp3;
    }
    {
        try {
            result = (XmlIndexDeclaration *)XmlIndexSpecification_find(arg1,(std::string const &)*arg2,(std::string const &)*arg3);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_XmlIndexDeclaration, 1);
    
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_XmlIndexDeclaration);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
}


ZEND_NAMED_FUNCTION(_wrap_XmlIndexSpecification_next) {
    XmlIndexSpecification *arg1 = (XmlIndexSpecification *) 0 ;
    XmlIndexDeclaration *result;
    zval **args[2];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlIndexSpecification) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlIndexSpecification_next. Expected %s", 1-argbase, SWIGTYPE_p_XmlIndexSpecification->name);
    }
    
    {
        try {
            result = (XmlIndexDeclaration *)XmlIndexSpecification_next(arg1);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_XmlIndexDeclaration, 1);
    
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_XmlIndexDeclaration);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
}


/* property handler for class XmlIndexSpecification */
static pval _wrap_propget_XmlIndexSpecification(zend_property_reference *property_reference) {
  pval result;
  pval **_result;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  result.type = IS_NULL;
  if (_propget_XmlIndexSpecification(property_reference, &result)==SUCCESS) return result;
  /* return it ourselves */
  if (zend_hash_find(Z_OBJPROP_P(property_reference->object),Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),(void**)&_result)==SUCCESS) {
  zval *_value;
  MAKE_STD_ZVAL(_value);  *_value=**_result;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return *_value;
  }
  result.type = IS_NULL;
  return result;
}
static int _propget_XmlIndexSpecification(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  return FAILURE;
}

static int _wrap_propset_XmlIndexSpecification(zend_property_reference *property_reference, pval *value) { 
  zval * _value;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  if (_propset_XmlIndexSpecification(property_reference, value)==SUCCESS) return SUCCESS;
  /* set it ourselves as it is XmlIndexSpecification */
  MAKE_STD_ZVAL(_value);
  *_value=*value;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return add_property_zval_ex(property_reference->object,Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),_value);
}
static int _propset_XmlIndexSpecification(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  return FAILURE;
}

/* This function is designed to be called by the zend list destructors to typecast and do the actual destruction */
void __wrap_delete_XmlIndexDeclaration(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
    swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
    void *ptr=value->ptr ;
    int newobject=value->newobject ;
    XmlIndexDeclaration *arg1 = (XmlIndexDeclaration *) 0 ;
    
    efree(value);
    if (! newobject) return; /* can't delete it! */
    SWIG_ZTS_ConvertResourceData(ptr,rsrc->type,type_name,(void **) &arg1,SWIGTYPE_p_XmlIndexDeclaration TSRMLS_CC);
    if (! arg1) zend_error(E_ERROR, "XmlIndexDeclaration resource already free'd");
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
}


ZEND_NAMED_FUNCTION(_wrap_delete_XmlIndexDeclaration) {
    XmlIndexDeclaration *arg1 = (XmlIndexDeclaration *) 0 ;
    zval **args[2];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlIndexDeclaration) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of delete_XmlIndexDeclaration. Expected %s", 1-argbase, SWIGTYPE_p_XmlIndexDeclaration->name);
    }
    
    /*if ((*args[0])->type==IS_RESOURCE) { */
    /*  Get zend list destructor to free it */
    /*  zend_list_delete(Z_LVAL_PP(args[0])); */
    /* } else {*/
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    /*}*/
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlIndexDeclaration_get_uri) {
    XmlIndexDeclaration *arg1 = (XmlIndexDeclaration *) 0 ;
    char *result;
    zval **args[2];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlIndexDeclaration) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlIndexDeclaration_get_uri. Expected %s", 1-argbase, SWIGTYPE_p_XmlIndexDeclaration->name);
    }
    
    {
        try {
            result = (char *)XmlIndexDeclaration_get_uri((XmlIndexDeclaration const *)arg1);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    ZVAL_STRING(return_value,result, 1);
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlIndexDeclaration_get_name) {
    XmlIndexDeclaration *arg1 = (XmlIndexDeclaration *) 0 ;
    char *result;
    zval **args[2];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlIndexDeclaration) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlIndexDeclaration_get_name. Expected %s", 1-argbase, SWIGTYPE_p_XmlIndexDeclaration->name);
    }
    
    {
        try {
            result = (char *)XmlIndexDeclaration_get_name((XmlIndexDeclaration const *)arg1);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    ZVAL_STRING(return_value,result, 1);
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlIndexDeclaration_get_index) {
    XmlIndexDeclaration *arg1 = (XmlIndexDeclaration *) 0 ;
    char *result;
    zval **args[2];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlIndexDeclaration) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlIndexDeclaration_get_index. Expected %s", 1-argbase, SWIGTYPE_p_XmlIndexDeclaration->name);
    }
    
    {
        try {
            result = (char *)XmlIndexDeclaration_get_index((XmlIndexDeclaration const *)arg1);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    ZVAL_STRING(return_value,result, 1);
    
}


ZEND_NAMED_FUNCTION(_wrap_new_XmlIndexDeclaration) {
    XmlIndexDeclaration *result;
    zval **args[1];
    int argbase=0 ;
    
    /* NATIVE Constructor */
    int self_constructor=1;
    if(((ZEND_NUM_ARGS() + argbase )!= 0) || (zend_get_parameters_array_ex(0-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    {
        try {
            result = (XmlIndexDeclaration *)new XmlIndexDeclaration();
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_XmlIndexDeclaration, 1);
    
    /* Wrap this return value */
    if (this_ptr) {
        /* NATIVE Constructor, use this_ptr */
        zval *_cPtr; MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        add_property_zval(this_ptr,"_cPtr",_cPtr);
    }else if (! this_ptr) {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_XmlIndexDeclaration);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
}


/* property handler for class XmlIndexDeclaration */
static pval _wrap_propget_XmlIndexDeclaration(zend_property_reference *property_reference) {
  pval result;
  pval **_result;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  result.type = IS_NULL;
  if (_propget_XmlIndexDeclaration(property_reference, &result)==SUCCESS) return result;
  /* return it ourselves */
  if (zend_hash_find(Z_OBJPROP_P(property_reference->object),Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),(void**)&_result)==SUCCESS) {
  zval *_value;
  MAKE_STD_ZVAL(_value);  *_value=**_result;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return *_value;
  }
  result.type = IS_NULL;
  return result;
}
static int _propget_XmlIndexDeclaration(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  return FAILURE;
}

static int _wrap_propset_XmlIndexDeclaration(zend_property_reference *property_reference, pval *value) { 
  zval * _value;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  if (_propset_XmlIndexDeclaration(property_reference, value)==SUCCESS) return SUCCESS;
  /* set it ourselves as it is XmlIndexDeclaration */
  MAKE_STD_ZVAL(_value);
  *_value=*value;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return add_property_zval_ex(property_reference->object,Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),_value);
}
static int _propset_XmlIndexDeclaration(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  return FAILURE;
}

ZEND_NAMED_FUNCTION(_wrap_new_XmlQueryExpression) {
    XmlContainer *arg1 = 0 ;
    XmlQueryContext *arg2 = 0 ;
    XmlQueryExpression *result;
    zval **args[3];
    int argbase=0 ;
    
    /* NATIVE Constructor */
    int self_constructor=1;
    if(((ZEND_NUM_ARGS() + argbase )!= 2) || (zend_get_parameters_array_ex(2-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlContainer) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of new_XmlQueryExpression. Expected %s", 1-argbase, SWIGTYPE_p_XmlContainer->name);
    }
    
    
    if(SWIG_ConvertPtr(*args[1-argbase], (void **) &arg2, SWIGTYPE_p_XmlQueryContext) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of new_XmlQueryExpression. Expected %s", 2-argbase, SWIGTYPE_p_XmlQueryContext->name);
    }
    
    {
        try {
            result = (XmlQueryExpression *)new XmlQueryExpression(*arg1,*arg2);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_XmlQueryExpression, 1);
    
    /* Wrap this return value */
    if (this_ptr) {
        /* NATIVE Constructor, use this_ptr */
        zval *_cPtr; MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        add_property_zval(this_ptr,"_cPtr",_cPtr);
    }else if (! this_ptr) {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_XmlQueryExpression);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
}


/* This function is designed to be called by the zend list destructors to typecast and do the actual destruction */
void __wrap_delete_XmlQueryExpression(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
    swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
    void *ptr=value->ptr ;
    int newobject=value->newobject ;
    XmlQueryExpression *arg1 = (XmlQueryExpression *) 0 ;
    
    efree(value);
    if (! newobject) return; /* can't delete it! */
    SWIG_ZTS_ConvertResourceData(ptr,rsrc->type,type_name,(void **) &arg1,SWIGTYPE_p_XmlQueryExpression TSRMLS_CC);
    if (! arg1) zend_error(E_ERROR, "XmlQueryExpression resource already free'd");
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
}


ZEND_NAMED_FUNCTION(_wrap_delete_XmlQueryExpression) {
    XmlQueryExpression *arg1 = (XmlQueryExpression *) 0 ;
    zval **args[2];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlQueryExpression) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of delete_XmlQueryExpression. Expected %s", 1-argbase, SWIGTYPE_p_XmlQueryExpression->name);
    }
    
    /*if ((*args[0])->type==IS_RESOURCE) { */
    /*  Get zend list destructor to free it */
    /*  zend_list_delete(Z_LVAL_PP(args[0])); */
    /* } else {*/
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    /*}*/
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlQueryExpression_getQueryContext) {
    XmlQueryExpression *arg1 = (XmlQueryExpression *) 0 ;
    XmlQueryContext *result;
    zval **args[2];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlQueryExpression) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlQueryExpression_getQueryContext. Expected %s", 1-argbase, SWIGTYPE_p_XmlQueryExpression->name);
    }
    
    {
        try {
            {
                XmlQueryContext &_result_ref = ((XmlQueryExpression const *)arg1)->getQueryContext();
                result = (XmlQueryContext *) &_result_ref;
            }
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_XmlQueryContext, 0);
    
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_XmlQueryContext);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
}


ZEND_NAMED_FUNCTION(_wrap_XmlQueryExpression_getContainer) {
    XmlQueryExpression *arg1 = (XmlQueryExpression *) 0 ;
    XmlContainer *result;
    zval **args[2];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlQueryExpression) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlQueryExpression_getContainer. Expected %s", 1-argbase, SWIGTYPE_p_XmlQueryExpression->name);
    }
    
    {
        try {
            {
                XmlContainer const &_result_ref = ((XmlQueryExpression const *)arg1)->getContainer();
                result = (XmlContainer *) &_result_ref;
            }
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_XmlContainer, 0);
    
    /* Wrap this return value */
    {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_XmlContainer);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
}


ZEND_NAMED_FUNCTION(_wrap_XmlQueryExpression_getXPathQuery) {
    XmlQueryExpression *arg1 = (XmlQueryExpression *) 0 ;
    char *result;
    zval **args[2];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlQueryExpression) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlQueryExpression_getXPathQuery. Expected %s", 1-argbase, SWIGTYPE_p_XmlQueryExpression->name);
    }
    
    {
        try {
            result = (char *)XmlQueryExpression_getXPathQuery((XmlQueryExpression const *)arg1);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    ZVAL_STRING(return_value,result, 1);
    
}


/* property handler for class XmlQueryExpression */
static pval _wrap_propget_XmlQueryExpression(zend_property_reference *property_reference) {
  pval result;
  pval **_result;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  result.type = IS_NULL;
  if (_propget_XmlQueryExpression(property_reference, &result)==SUCCESS) return result;
  /* return it ourselves */
  if (zend_hash_find(Z_OBJPROP_P(property_reference->object),Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),(void**)&_result)==SUCCESS) {
  zval *_value;
  MAKE_STD_ZVAL(_value);  *_value=**_result;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return *_value;
  }
  result.type = IS_NULL;
  return result;
}
static int _propget_XmlQueryExpression(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  return FAILURE;
}

static int _wrap_propset_XmlQueryExpression(zend_property_reference *property_reference, pval *value) { 
  zval * _value;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  if (_propset_XmlQueryExpression(property_reference, value)==SUCCESS) return SUCCESS;
  /* set it ourselves as it is XmlQueryExpression */
  MAKE_STD_ZVAL(_value);
  *_value=*value;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return add_property_zval_ex(property_reference->object,Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),_value);
}
static int _propset_XmlQueryExpression(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  return FAILURE;
}

ZEND_NAMED_FUNCTION(_wrap_new_XmlModify) {
    std::string *arg1 = 0 ;
    int arg2 ;
    int arg3 ;
    std::string *arg4 = 0 ;
    std::string *arg5 = 0 ;
    int32_t arg6 = (int32_t) -1 ;
    XmlQueryContext *arg7 = (XmlQueryContext *) NULL ;
    XmlModify *result;
    std::string temp1 ;
    std::string temp4 ;
    std::string temp5 ;
    zval **args[8];
    int argbase=0 ;
    int arg_count;
    
    /* NATIVE Constructor */
    int self_constructor=1;
    arg_count = ZEND_NUM_ARGS();
    if(arg_count<(5-argbase) || arg_count>(7-argbase))
    WRONG_PARAM_COUNT;
    
    if(zend_get_parameters_array_ex(arg_count-argbase,args)!=SUCCESS)
    WRONG_PARAM_COUNT;
    
    {
        convert_to_string_ex(((0<argbase)?(&this_ptr):(args[0-argbase])));
        temp1 = std::string(Z_STRVAL_PP(((0<argbase)?(&this_ptr):(args[0-argbase]))));
        arg1 = &temp1;
    }
    
    convert_to_long_ex(args[1-argbase]);
    arg2 = (int) Z_LVAL_PP(args[1-argbase]);
    
    
    convert_to_long_ex(args[2-argbase]);
    arg3 = (int) Z_LVAL_PP(args[2-argbase]);
    
    {
        convert_to_string_ex(args[3-argbase]);
        temp4 = std::string(Z_STRVAL_PP(args[3-argbase]));
        arg4 = &temp4;
    }
    {
        convert_to_string_ex(args[4-argbase]);
        temp5 = std::string(Z_STRVAL_PP(args[4-argbase]));
        arg5 = &temp5;
    }
    if(arg_count > 5) {
        convert_to_long_ex(args[5-argbase]);
        arg6 = (int32_t) Z_LVAL_PP(args[5-argbase]);
        
    }
    if(arg_count > 6) {
        if(SWIG_ConvertPtr(*args[6-argbase], (void **) &arg7, SWIGTYPE_p_XmlQueryContext) < 0) {
            zend_error(E_ERROR, "Type error in argument %d of new_XmlModify. Expected %s", 7-argbase, SWIGTYPE_p_XmlQueryContext->name);
        }
        
    }
    {
        try {
            result = (XmlModify *)new XmlModify((std::string const &)*arg1,(XmlModify::ModificationType )arg2,(XmlModify::XmlObject )arg3,(std::string const &)*arg4,(std::string const &)*arg5,arg6,arg7);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    SWIG_SetPointerZval(return_value, (void *)result, SWIGTYPE_p_XmlModify, 1);
    
    /* Wrap this return value */
    if (this_ptr) {
        /* NATIVE Constructor, use this_ptr */
        zval *_cPtr; MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        add_property_zval(this_ptr,"_cPtr",_cPtr);
    }else if (! this_ptr) {
        /* ALTERNATIVE Constructor, make an object wrapper */
        zval *obj, *_cPtr;
        MAKE_STD_ZVAL(obj);
        MAKE_STD_ZVAL(_cPtr);
        *_cPtr = *return_value;
        INIT_ZVAL(*return_value);
        object_init_ex(obj,ptr_ce_swig_XmlModify);
        add_property_zval(obj,"_cPtr",_cPtr);
        *return_value=*obj;
    }
}


/* This function is designed to be called by the zend list destructors to typecast and do the actual destruction */
void __wrap_delete_XmlModify(zend_rsrc_list_entry *rsrc, const char *type_name TSRMLS_DC) {
    swig_object_wrapper *value=(swig_object_wrapper *) rsrc->ptr ;
    void *ptr=value->ptr ;
    int newobject=value->newobject ;
    XmlModify *arg1 = (XmlModify *) 0 ;
    
    efree(value);
    if (! newobject) return; /* can't delete it! */
    SWIG_ZTS_ConvertResourceData(ptr,rsrc->type,type_name,(void **) &arg1,SWIGTYPE_p_XmlModify TSRMLS_CC);
    if (! arg1) zend_error(E_ERROR, "XmlModify resource already free'd");
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
}


ZEND_NAMED_FUNCTION(_wrap_delete_XmlModify) {
    XmlModify *arg1 = (XmlModify *) 0 ;
    zval **args[2];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlModify) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of delete_XmlModify. Expected %s", 1-argbase, SWIGTYPE_p_XmlModify->name);
    }
    
    /*if ((*args[0])->type==IS_RESOURCE) { */
    /*  Get zend list destructor to free it */
    /*  zend_list_delete(Z_LVAL_PP(args[0])); */
    /* } else {*/
    {
        try {
            delete arg1;
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    /*}*/
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlModify_setNewEncoding) {
    XmlModify *arg1 = (XmlModify *) 0 ;
    std::string *arg2 = 0 ;
    std::string temp2 ;
    zval **args[3];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 2) || (zend_get_parameters_array_ex(2-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlModify) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlModify_setNewEncoding. Expected %s", 1-argbase, SWIGTYPE_p_XmlModify->name);
    }
    
    {
        convert_to_string_ex(args[1-argbase]);
        temp2 = std::string(Z_STRVAL_PP(args[1-argbase]));
        arg2 = &temp2;
    }
    {
        try {
            (arg1)->setNewEncoding((std::string const &)*arg2);
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
}


ZEND_NAMED_FUNCTION(_wrap_XmlModify_getNumModifications) {
    XmlModify *arg1 = (XmlModify *) 0 ;
    int result;
    zval **args[2];
    int argbase=0 ;
    
    if (this_ptr && this_ptr->type==IS_OBJECT) {
        /* fake this_ptr as first arg (till we can work out how to do it better */
        argbase++;
    }
    if(((ZEND_NUM_ARGS() + argbase )!= 1) || (zend_get_parameters_array_ex(1-argbase, args)!= SUCCESS)) {
        WRONG_PARAM_COUNT;
    }
    
    
    if(SWIG_ConvertPtr(*((0<argbase)?(&this_ptr):(args[0-argbase])), (void **) &arg1, SWIGTYPE_p_XmlModify) < 0) {
        zend_error(E_ERROR, "Type error in argument %d of XmlModify_getNumModifications. Expected %s", 1-argbase, SWIGTYPE_p_XmlModify->name);
    }
    
    {
        try {
            result = (int)(arg1)->getNumModifications();
            
        }catch (XmlException &e) {
            zend_error(E_ERROR, e.what());
            /* I think zend_error aborts the function */
            /* ZVAL_BOOL(return_value,0); */
        }
    }
    
    ZVAL_LONG(return_value,result);
    
}


/* property handler for class XmlModify */
static pval _wrap_propget_XmlModify(zend_property_reference *property_reference) {
  pval result;
  pval **_result;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  result.type = IS_NULL;
  if (_propget_XmlModify(property_reference, &result)==SUCCESS) return result;
  /* return it ourselves */
  if (zend_hash_find(Z_OBJPROP_P(property_reference->object),Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),(void**)&_result)==SUCCESS) {
  zval *_value;
  MAKE_STD_ZVAL(_value);  *_value=**_result;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return *_value;
  }
  result.type = IS_NULL;
  return result;
}
static int _propget_XmlModify(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  return FAILURE;
}

static int _wrap_propset_XmlModify(zend_property_reference *property_reference, pval *value) { 
  zval * _value;
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  if (_propset_XmlModify(property_reference, value)==SUCCESS) return SUCCESS;
  /* set it ourselves as it is XmlModify */
  MAKE_STD_ZVAL(_value);
  *_value=*value;
  INIT_PZVAL(_value);
  zval_copy_ctor(_value);
  return add_property_zval_ex(property_reference->object,Z_STRVAL_P(&(property->element)),1+Z_STRLEN_P(&(property->element)),_value);
}
static int _propset_XmlModify(zend_property_reference *property_reference, pval *value) {
  /* get the property name */
  zend_llist_element *element = property_reference->elements_list->head;
  zend_overloaded_element *property=(zend_overloaded_element *)element->data;
  char *propname=Z_STRVAL_P(&(property->element));
  return FAILURE;
}

/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_XmlResults) {
/* has destructor: __wrap_delete_XmlResults */
__wrap_delete_XmlResults(rsrc, SWIGTYPE_p_XmlResults->name TSRMLS_CC);
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_XmlQueryContext) {
/* has destructor: __wrap_delete_XmlQueryContext */
__wrap_delete_XmlQueryContext(rsrc, SWIGTYPE_p_XmlQueryContext->name TSRMLS_CC);
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_XmlUpdateContext) {
/* has destructor: __wrap_delete_XmlUpdateContext */
__wrap_delete_XmlUpdateContext(rsrc, SWIGTYPE_p_XmlUpdateContext->name TSRMLS_CC);
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_XmlIndexSpecification) {
/* has destructor: __wrap_delete_XmlIndexSpecification */
__wrap_delete_XmlIndexSpecification(rsrc, SWIGTYPE_p_XmlIndexSpecification->name TSRMLS_CC);
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_u_int32_t) {
/* bah! No destructor for this simple type!! */
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_XmlValue) {
/* has destructor: __wrap_delete_XmlValue */
__wrap_delete_XmlValue(rsrc, SWIGTYPE_p_XmlValue->name TSRMLS_CC);
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_char) {
/* bah! No destructor for this simple type!! */
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_XmlQueryExpression) {
/* has destructor: __wrap_delete_XmlQueryExpression */
__wrap_delete_XmlQueryExpression(rsrc, SWIGTYPE_p_XmlQueryExpression->name TSRMLS_CC);
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_DbTxn) {
/* bah! No destructor for this wrapped class!! */
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_XmlContainer) {
/* has destructor: __wrap_delete_XmlContainer */
__wrap_delete_XmlContainer(rsrc, SWIGTYPE_p_XmlContainer->name TSRMLS_CC);
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_DbEnv) {
/* has destructor: __wrap_delete_DbEnv */
__wrap_delete_DbEnv(rsrc, SWIGTYPE_p_DbEnv->name TSRMLS_CC);
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_XmlModify) {
/* has destructor: __wrap_delete_XmlModify */
__wrap_delete_XmlModify(rsrc, SWIGTYPE_p_XmlModify->name TSRMLS_CC);
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_XmlDocument) {
/* has destructor: __wrap_delete_XmlDocument */
__wrap_delete_XmlDocument(rsrc, SWIGTYPE_p_XmlDocument->name TSRMLS_CC);
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_int) {
/* bah! No destructor for this simple type!! */
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_int) {
/* bah! No destructor for this simple type!! */
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_db_timeout_t) {
/* bah! No destructor for this simple type!! */
}
/* NEW Destructor style */
static ZEND_RSRC_DTOR_FUNC(_wrap_destroy_p_XmlIndexDeclaration) {
/* has destructor: __wrap_delete_XmlIndexDeclaration */
__wrap_delete_XmlIndexDeclaration(rsrc, SWIGTYPE_p_XmlIndexDeclaration->name TSRMLS_CC);
}




/* end wrapper section */
/* init section */
#ifdef COMPILE_DL_DBXML_PHP4
#ifdef __cplusplus
extern "C" {
#endif
ZEND_GET_MODULE(dbxml_php4)
#ifdef __cplusplus
}
#endif

#endif

PHP_MSHUTDOWN_FUNCTION(dbxml_php4)
{
    return SUCCESS;
}
PHP_MINIT_FUNCTION(dbxml_php4)
{
    int i;
    for (i = 0; swig_types_initial[i]; i++) {
        swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
    }
/* oinit subsection */
/* Define class DbTxn */
INIT_OVERLOADED_CLASS_ENTRY(ce_swig_DbTxn,"dbtxn",DbTxn_functions,NULL,_wrap_propget_DbTxn,_wrap_propset_DbTxn);
if (! (ptr_ce_swig_DbTxn=zend_register_internal_class_ex(&ce_swig_DbTxn,NULL,NULL))) zend_error(E_ERROR,"Error registering wrapper for class DbTxn");

/* Define class DbEnv */
INIT_OVERLOADED_CLASS_ENTRY(ce_swig_DbEnv,"dbenv",DbEnv_functions,NULL,_wrap_propget_DbEnv,_wrap_propset_DbEnv);
if (! (ptr_ce_swig_DbEnv=zend_register_internal_class_ex(&ce_swig_DbEnv,NULL,NULL))) zend_error(E_ERROR,"Error registering wrapper for class DbEnv");

/* Define class XmlContainer */
INIT_OVERLOADED_CLASS_ENTRY(ce_swig_XmlContainer,"xmlcontainer",XmlContainer_functions,NULL,_wrap_propget_XmlContainer,_wrap_propset_XmlContainer);
if (! (ptr_ce_swig_XmlContainer=zend_register_internal_class_ex(&ce_swig_XmlContainer,NULL,NULL))) zend_error(E_ERROR,"Error registering wrapper for class XmlContainer");

/* Define class XmlDocument */
INIT_OVERLOADED_CLASS_ENTRY(ce_swig_XmlDocument,"xmldocument",XmlDocument_functions,NULL,_wrap_propget_XmlDocument,_wrap_propset_XmlDocument);
if (! (ptr_ce_swig_XmlDocument=zend_register_internal_class_ex(&ce_swig_XmlDocument,NULL,NULL))) zend_error(E_ERROR,"Error registering wrapper for class XmlDocument");

/* Define class XmlQueryContext */
INIT_OVERLOADED_CLASS_ENTRY(ce_swig_XmlQueryContext,"xmlquerycontext",XmlQueryContext_functions,NULL,_wrap_propget_XmlQueryContext,_wrap_propset_XmlQueryContext);
if (! (ptr_ce_swig_XmlQueryContext=zend_register_internal_class_ex(&ce_swig_XmlQueryContext,NULL,NULL))) zend_error(E_ERROR,"Error registering wrapper for class XmlQueryContext");

/* Define class XmlResults */
INIT_OVERLOADED_CLASS_ENTRY(ce_swig_XmlResults,"xmlresults",XmlResults_functions,NULL,_wrap_propget_XmlResults,_wrap_propset_XmlResults);
if (! (ptr_ce_swig_XmlResults=zend_register_internal_class_ex(&ce_swig_XmlResults,NULL,NULL))) zend_error(E_ERROR,"Error registering wrapper for class XmlResults");

/* Define class XmlUpdateContext */
INIT_OVERLOADED_CLASS_ENTRY(ce_swig_XmlUpdateContext,"xmlupdatecontext",XmlUpdateContext_functions,NULL,_wrap_propget_XmlUpdateContext,_wrap_propset_XmlUpdateContext);
if (! (ptr_ce_swig_XmlUpdateContext=zend_register_internal_class_ex(&ce_swig_XmlUpdateContext,NULL,NULL))) zend_error(E_ERROR,"Error registering wrapper for class XmlUpdateContext");

/* Define class XmlValue */
INIT_OVERLOADED_CLASS_ENTRY(ce_swig_XmlValue,"xmlvalue",XmlValue_functions,NULL,_wrap_propget_XmlValue,_wrap_propset_XmlValue);
if (! (ptr_ce_swig_XmlValue=zend_register_internal_class_ex(&ce_swig_XmlValue,NULL,NULL))) zend_error(E_ERROR,"Error registering wrapper for class XmlValue");

/* Define class XmlIndexSpecification */
INIT_OVERLOADED_CLASS_ENTRY(ce_swig_XmlIndexSpecification,"xmlindexspecification",XmlIndexSpecification_functions,NULL,_wrap_propget_XmlIndexSpecification,_wrap_propset_XmlIndexSpecification);
if (! (ptr_ce_swig_XmlIndexSpecification=zend_register_internal_class_ex(&ce_swig_XmlIndexSpecification,NULL,NULL))) zend_error(E_ERROR,"Error registering wrapper for class XmlIndexSpecification");

/* Define class XmlIndexDeclaration */
INIT_OVERLOADED_CLASS_ENTRY(ce_swig_XmlIndexDeclaration,"xmlindexdeclaration",XmlIndexDeclaration_functions,NULL,_wrap_propget_XmlIndexDeclaration,_wrap_propset_XmlIndexDeclaration);
if (! (ptr_ce_swig_XmlIndexDeclaration=zend_register_internal_class_ex(&ce_swig_XmlIndexDeclaration,NULL,NULL))) zend_error(E_ERROR,"Error registering wrapper for class XmlIndexDeclaration");

/* Define class XmlQueryExpression */
INIT_OVERLOADED_CLASS_ENTRY(ce_swig_XmlQueryExpression,"xmlqueryexpression",XmlQueryExpression_functions,NULL,_wrap_propget_XmlQueryExpression,_wrap_propset_XmlQueryExpression);
if (! (ptr_ce_swig_XmlQueryExpression=zend_register_internal_class_ex(&ce_swig_XmlQueryExpression,NULL,NULL))) zend_error(E_ERROR,"Error registering wrapper for class XmlQueryExpression");

/* Define class XmlModify */
INIT_OVERLOADED_CLASS_ENTRY(ce_swig_XmlModify,"xmlmodify",XmlModify_functions,NULL,_wrap_propget_XmlModify,_wrap_propset_XmlModify);
if (! (ptr_ce_swig_XmlModify=zend_register_internal_class_ex(&ce_swig_XmlModify,NULL,NULL))) zend_error(E_ERROR,"Error registering wrapper for class XmlModify");


/* Register resource destructors for pointer types */
le_swig__p_XmlResults=zend_register_list_destructors_ex(_wrap_destroy_p_XmlResults,NULL,(char *)(SWIGTYPE_p_XmlResults->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_XmlResults,&le_swig__p_XmlResults);
le_swig__p_XmlQueryContext=zend_register_list_destructors_ex(_wrap_destroy_p_XmlQueryContext,NULL,(char *)(SWIGTYPE_p_XmlQueryContext->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_XmlQueryContext,&le_swig__p_XmlQueryContext);
le_swig__p_XmlUpdateContext=zend_register_list_destructors_ex(_wrap_destroy_p_XmlUpdateContext,NULL,(char *)(SWIGTYPE_p_XmlUpdateContext->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_XmlUpdateContext,&le_swig__p_XmlUpdateContext);
le_swig__p_XmlIndexSpecification=zend_register_list_destructors_ex(_wrap_destroy_p_XmlIndexSpecification,NULL,(char *)(SWIGTYPE_p_XmlIndexSpecification->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_XmlIndexSpecification,&le_swig__p_XmlIndexSpecification);
le_swig__p_u_int32_t=zend_register_list_destructors_ex(_wrap_destroy_p_u_int32_t,NULL,(char *)(SWIGTYPE_p_u_int32_t->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_u_int32_t,&le_swig__p_u_int32_t);
le_swig__p_XmlValue=zend_register_list_destructors_ex(_wrap_destroy_p_XmlValue,NULL,(char *)(SWIGTYPE_p_XmlValue->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_XmlValue,&le_swig__p_XmlValue);
le_swig__p_char=zend_register_list_destructors_ex(_wrap_destroy_p_char,NULL,(char *)(SWIGTYPE_p_char->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_char,&le_swig__p_char);
le_swig__p_XmlQueryExpression=zend_register_list_destructors_ex(_wrap_destroy_p_XmlQueryExpression,NULL,(char *)(SWIGTYPE_p_XmlQueryExpression->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_XmlQueryExpression,&le_swig__p_XmlQueryExpression);
le_swig__p_DbTxn=zend_register_list_destructors_ex(_wrap_destroy_p_DbTxn,NULL,(char *)(SWIGTYPE_p_DbTxn->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_DbTxn,&le_swig__p_DbTxn);
le_swig__p_XmlContainer=zend_register_list_destructors_ex(_wrap_destroy_p_XmlContainer,NULL,(char *)(SWIGTYPE_p_XmlContainer->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_XmlContainer,&le_swig__p_XmlContainer);
le_swig__p_DbEnv=zend_register_list_destructors_ex(_wrap_destroy_p_DbEnv,NULL,(char *)(SWIGTYPE_p_DbEnv->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_DbEnv,&le_swig__p_DbEnv);
le_swig__p_XmlModify=zend_register_list_destructors_ex(_wrap_destroy_p_XmlModify,NULL,(char *)(SWIGTYPE_p_XmlModify->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_XmlModify,&le_swig__p_XmlModify);
le_swig__p_XmlDocument=zend_register_list_destructors_ex(_wrap_destroy_p_XmlDocument,NULL,(char *)(SWIGTYPE_p_XmlDocument->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_XmlDocument,&le_swig__p_XmlDocument);
le_swig__int=zend_register_list_destructors_ex(_wrap_destroy_int,NULL,(char *)(SWIGTYPE_int->name),module_number);
SWIG_TypeClientData(SWIGTYPE_int,&le_swig__int);
le_swig__p_int=zend_register_list_destructors_ex(_wrap_destroy_p_int,NULL,(char *)(SWIGTYPE_p_int->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_int,&le_swig__p_int);
le_swig__p_db_timeout_t=zend_register_list_destructors_ex(_wrap_destroy_p_db_timeout_t,NULL,(char *)(SWIGTYPE_p_db_timeout_t->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_db_timeout_t,&le_swig__p_db_timeout_t);
le_swig__p_XmlIndexDeclaration=zend_register_list_destructors_ex(_wrap_destroy_p_XmlIndexDeclaration,NULL,(char *)(SWIGTYPE_p_XmlIndexDeclaration->name),module_number);
SWIG_TypeClientData(SWIGTYPE_p_XmlIndexDeclaration,&le_swig__p_XmlIndexDeclaration);
CG(active_class_entry) = NULL;
/* end oinit subsection */

    return SUCCESS;
}
PHP_RINIT_FUNCTION(dbxml_php4)
{
/* cinit subsection */
REGISTER_LONG_CONSTANT( "DB_AUTO_COMMIT", DB_AUTO_COMMIT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "DB_CREATE", DB_CREATE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "DB_DIRTY_READ", DB_DIRTY_READ, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "DB_EXCL", DB_EXCL, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "DB_NOMMAP", DB_NOMMAP, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "DB_RDONLY", DB_RDONLY, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "DB_THREAD", DB_THREAD, CONST_CS | CONST_PERSISTENT);
REGISTER_STRING_CONSTANT("metaDataNamespace_uri", "DbXml::metaDataNamespace_uri", CONST_CS | CONST_PERSISTENT);
REGISTER_STRING_CONSTANT("metaDataNamespace_prefix", "DbXml::metaDataNamespace_prefix", CONST_CS | CONST_PERSISTENT);
REGISTER_STRING_CONSTANT("metaDataName_id", "DbXml::metaDataName_id", CONST_CS | CONST_PERSISTENT);
REGISTER_STRING_CONSTANT("metaDataName_name", "DbXml::metaDataName_name", CONST_CS | CONST_PERSISTENT);
REGISTER_STRING_CONSTANT("metaDataName_content", "DbXml::metaDataName_content", CONST_CS | CONST_PERSISTENT);
REGISTER_STRING_CONSTANT("metaDataName_default", "DbXml::metaDataName_default", CONST_CS | CONST_PERSISTENT);
REGISTER_STRING_CONSTANT("metaDataNamespace_prefix_debug", "DbXml::metaDataNamespace_prefix_debug", CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "LEVEL_NONE", LEVEL_NONE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "LEVEL_DEBUG", LEVEL_DEBUG, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "LEVEL_INFO", LEVEL_INFO, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "LEVEL_WARNING", LEVEL_WARNING, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "LEVEL_ERROR", LEVEL_ERROR, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "LEVEL_ALL", LEVEL_ALL, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "CATEGORY_NONE", CATEGORY_NONE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "CATEGORY_INDEXER", CATEGORY_INDEXER, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "CATEGORY_QUERY", CATEGORY_QUERY, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "CATEGORY_OPTIMIZER", CATEGORY_OPTIMIZER, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "CATEGORY_DICTIONARY", CATEGORY_DICTIONARY, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "CATEGORY_CONTAINER", CATEGORY_CONTAINER, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "CATEGORY_ALL", CATEGORY_ALL, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "XmlQueryContext_ResultDocuments", XmlQueryContext::ResultDocuments, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "XmlQueryContext_ResultValues", XmlQueryContext::ResultValues, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "XmlQueryContext_CandidateDocuments", XmlQueryContext::CandidateDocuments, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "XmlQueryContext_ResultDocumentsAndValues", XmlQueryContext::ResultDocumentsAndValues, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "XmlQueryContext_Eager", XmlQueryContext::Eager, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "XmlQueryContext_Lazy", XmlQueryContext::Lazy, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "XmlValue_NONE", XmlValue::NONE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "XmlValue_STRING", XmlValue::STRING, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "XmlValue_NUMBER", XmlValue::NUMBER, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "XmlValue_BOOLEAN", XmlValue::BOOLEAN, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "XmlValue_DOCUMENT", XmlValue::DOCUMENT, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "XmlValue_NODE", XmlValue::NODE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "XmlValue_VARIABLE", XmlValue::VARIABLE, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "XmlValue_BINARY", XmlValue::BINARY, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "XmlModify_InsertAfter", XmlModify::InsertAfter, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "XmlModify_InsertBefore", XmlModify::InsertBefore, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "XmlModify_Append", XmlModify::Append, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "XmlModify_Update", XmlModify::Update, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "XmlModify_Remove", XmlModify::Remove, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "XmlModify_Rename", XmlModify::Rename, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "XmlModify_Element", XmlModify::Element, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "XmlModify_Attribute", XmlModify::Attribute, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "XmlModify_Text", XmlModify::Text, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "XmlModify_ProcessingInstruction", XmlModify::ProcessingInstruction, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "XmlModify_Comment", XmlModify::Comment, CONST_CS | CONST_PERSISTENT);
REGISTER_LONG_CONSTANT( "XmlModify_None", XmlModify::None, CONST_CS | CONST_PERSISTENT);
/* end cinit subsection */

/* vinit subsection */
/* end vinit subsection */

    return SUCCESS;
}
PHP_RSHUTDOWN_FUNCTION(dbxml_php4)
{
    return SUCCESS;
}
PHP_MINFO_FUNCTION(dbxml_php4)
{
}
/* end init section */
