PHP_FE(udm_free_res, NULL)
PHP_FE(udm_free_agent, NULL)
+
+#if UDM_VERSION_ID > 30110
+ PHP_FE(udm_get_doc_count, NULL)
+#endif
{NULL, NULL, NULL}
};
DLEXPORT PHP_MINFO_FUNCTION(mnogosearch)
{
+ char buf[32];
+
php_info_print_table_start();
php_info_print_table_row(2, "mnoGoSearch Support", "enabled" );
+
+ sprintf(buf,"%d", UDM_VERSION_ID);
+ php_info_print_table_row(2, "mnoGoSearch library version", buf );
php_info_print_table_end();
}
/* }}} */
+#if UDM_VERSION_ID > 30110
+/* {{{ proto int udm_get_doc_count(int agent)
+ Get total number of documents in database */
+DLEXPORT PHP_FUNCTION(udm_get_doc_count)
+{
+ pval ** yyagent;
+ UDM_AGENT * Agent;
+ int id=-1;
+
+ switch(ZEND_NUM_ARGS()){
+ case 1: {
+ if (zend_get_parameters_ex(1, &yyagent)==FAILURE) {
+ RETURN_FALSE;
+ }
+ }
+ break;
+ default:
+ WRONG_PARAM_COUNT;
+ break;
+ }
+ ZEND_FETCH_RESOURCE(Agent, UDM_AGENT *, yyagent, id, "mnoGoSearch-Agent", le_link);
+ RETURN_LONG(UdmGetDocCount(Agent));
+}
+/* }}} */
+#endif
+
+
#endif
#if HAVE_MNOGOSEARCH
+#include <udm_config.h>
+#include <udmsearch.h>
+
extern zend_module_entry mnogosearch_module_entry;
#define mnogosearch_module_ptr &mnogosearch_module_entry
DLEXPORT PHP_FUNCTION(udm_free_res);
DLEXPORT PHP_FUNCTION(udm_free_agent);
+#if UDM_VERSION_ID > 30110
+DLEXPORT PHP_FUNCTION(udm_get_doc_count);
+#endif
+
#else
#define mnogosearch_module_ptr NULL