@@ -174,6 +174,7 @@ PHP_MINIT_FUNCTION(SearchSortGeoDistance);
174
174
PHP_MINIT_FUNCTION (SearchSortId );
175
175
PHP_MINIT_FUNCTION (SearchSortScore );
176
176
PHP_MINIT_FUNCTION (CryptoProvider );
177
+ PHP_MINIT_FUNCTION (SearchIndexManager );
177
178
178
179
zval * bop_get_return_doc (zval * return_value , const char * key , int key_len , int is_mapped TSRMLS_DC );
179
180
@@ -496,6 +497,12 @@ typedef struct {
496
497
PCBC_ZEND_OBJECT_POST
497
498
} pcbc_cluster_manager_t ;
498
499
500
+ typedef struct {
501
+ PCBC_ZEND_OBJECT_PRE
502
+ pcbc_connection_t * conn ;
503
+ PCBC_ZEND_OBJECT_POST
504
+ } pcbc_search_index_manager_t ;
505
+
499
506
struct pcbc_crypto_id {
500
507
char * name ;
501
508
int name_len ;
@@ -825,6 +832,7 @@ void pcbc_bucket_view_request(pcbc_bucket_t *bucket, lcb_CMDVIEWQUERY *cmd, int
825
832
zval * return_value TSRMLS_DC );
826
833
void pcbc_spatial_view_query_init (zval * return_value , char * design_document , int design_document_len , char * view_name ,
827
834
int view_name_len TSRMLS_DC );
835
+ void pcbc_search_index_manager_init (zval * return_value , pcbc_bucket_manager_t * bucket_manager TSRMLS_DC );
828
836
829
837
void pcbc_boolean_field_search_query_init (zval * return_value , zend_bool value TSRMLS_DC );
830
838
void pcbc_boolean_search_query_init (zval * return_value TSRMLS_DC );
@@ -851,7 +859,8 @@ void pcbc_numeric_range_search_facet_init(zval *return_value, char *field, int f
851
859
void pcbc_search_sort_id_init (zval * return_value TSRMLS_DC );
852
860
void pcbc_search_sort_score_init (zval * return_value TSRMLS_DC );
853
861
void pcbc_search_sort_field_init (zval * return_value , const char * field , int field_len TSRMLS_DC );
854
- void pcbc_search_sort_geo_distance_init (zval * return_value , const char * field , int field_len , double lon , double lat TSRMLS_DC );
862
+ void pcbc_search_sort_geo_distance_init (zval * return_value , const char * field , int field_len , double lon ,
863
+ double lat TSRMLS_DC );
855
864
856
865
#if PHP_VERSION_ID >= 70000
857
866
void pcbc_lookup_in_builder_init (zval * return_value , zval * bucket , const char * id , int id_len , zval * args ,
@@ -877,8 +886,10 @@ void pcbc_password_authenticator_init(zval *return_value, char *username, int us
877
886
878
887
void pcbc_crypto_register (pcbc_bucket_t * obj , const char * name , int name_len , zval * provider TSRMLS_DC );
879
888
void pcbc_crypto_unregister (pcbc_bucket_t * obj , const char * name , int name_len TSRMLS_DC );
880
- void pcbc_crypto_encrypt_fields (pcbc_bucket_t * obj , zval * document , zval * options , const char * prefix , zval * return_value TSRMLS_DC );
881
- void pcbc_crypto_decrypt_fields (pcbc_bucket_t * obj , zval * document , zval * options , const char * prefix , zval * return_value TSRMLS_DC );
889
+ void pcbc_crypto_encrypt_fields (pcbc_bucket_t * obj , zval * document , zval * options , const char * prefix ,
890
+ zval * return_value TSRMLS_DC );
891
+ void pcbc_crypto_decrypt_fields (pcbc_bucket_t * obj , zval * document , zval * options , const char * prefix ,
892
+ zval * return_value TSRMLS_DC );
882
893
883
894
#if PHP_VERSION_ID >= 70000
884
895
static inline pcbc_cluster_t * pcbc_cluster_fetch_object (zend_object * obj )
@@ -945,6 +956,10 @@ static inline pcbc_user_settings_t *pcbc_user_settings_fetch_object(zend_object
945
956
{
946
957
return (pcbc_user_settings_t * )((char * )obj - XtOffsetOf (pcbc_user_settings_t , std ));
947
958
}
959
+ static inline pcbc_search_index_manager_t * pcbc_search_index_manager_fetch_object (zend_object * obj )
960
+ {
961
+ return (pcbc_search_index_manager_t * )((char * )obj - XtOffsetOf (pcbc_search_index_manager_t , std ));
962
+ }
948
963
#define Z_CLUSTER_OBJ (zo ) (pcbc_cluster_fetch_object(zo))
949
964
#define Z_CLUSTER_OBJ_P (zv ) (pcbc_cluster_fetch_object(Z_OBJ_P(zv)))
950
965
#define Z_CLUSTER_MANAGER_OBJ (zo ) (pcbc_cluster_manager_fetch_object(zo))
@@ -977,6 +992,8 @@ static inline pcbc_user_settings_t *pcbc_user_settings_fetch_object(zend_object
977
992
#define Z_CERT_AUTHENTICATOR_OBJ_P (zv ) (pcbc_cert_authenticator_fetch_object(Z_OBJ_P(zv)))
978
993
#define Z_USER_SETTINGS_OBJ (zo ) (pcbc_user_settings_fetch_object(zo))
979
994
#define Z_USER_SETTINGS_OBJ_P (zv ) (pcbc_user_settings_fetch_object(Z_OBJ_P(zv)))
995
+ #define Z_SEARCH_INDEX_MANAGER_OBJ (zo ) (pcbc_search_index_manager_fetch_object(zo))
996
+ #define Z_SEARCH_INDEX_MANAGER_OBJ_P (zv ) (pcbc_search_index_manager_fetch_object(Z_OBJ_P(zv)))
980
997
#else
981
998
#define Z_CLUSTER_OBJ (zo ) ((pcbc_cluster_t *)zo)
982
999
#define Z_CLUSTER_OBJ_P (zv ) ((pcbc_cluster_t *)zend_object_store_get_object(zv TSRMLS_CC))
@@ -1010,6 +1027,8 @@ static inline pcbc_user_settings_t *pcbc_user_settings_fetch_object(zend_object
1010
1027
#define Z_CERT_AUTHENTICATOR_OBJ_P (zv ) ((pcbc_cert_authenticator_t *)zend_object_store_get_object(zv TSRMLS_CC))
1011
1028
#define Z_USER_SETTINGS_OBJ (zo ) ((pcbc_user_settings_t *)zo)
1012
1029
#define Z_USER_SETTINGS_OBJ_P (zv ) ((pcbc_user_settings_t *)zend_object_store_get_object(zv TSRMLS_CC))
1030
+ #define Z_SEARCH_INDEX_MANAGER_OBJ (zo ) ((pcbc_search_index_manager_t *)zo)
1031
+ #define Z_SEARCH_INDEX_MANAGER_OBJ_P (zv ) ((pcbc_search_index_manager_t *)zend_object_store_get_object(zv TSRMLS_CC))
1013
1032
#endif
1014
1033
1015
1034
typedef struct {
0 commit comments