@@ -126,18 +126,6 @@ static zend_function_entry php_phongo_objectid_me[] = {
126
126
/* }}} */
127
127
128
128
129
- /* {{{ Other functions */
130
- static int php_phongo_objectid_compare_objects (zval * o1 , zval * o2 TSRMLS_DC ) /* {{{ */
131
- {
132
- php_phongo_objectid_t * intern1 ;
133
- php_phongo_objectid_t * intern2 ;
134
-
135
- intern1 = (php_phongo_objectid_t * )zend_object_store_get_object (o1 TSRMLS_CC );
136
- intern2 = (php_phongo_objectid_t * )zend_object_store_get_object (o2 TSRMLS_CC );
137
-
138
- return strcmp (intern1 -> oid , intern2 -> oid );
139
- } /* }}} */
140
- /* }}} */
141
129
/* {{{ php_phongo_objectid_t object handlers */
142
130
static void php_phongo_objectid_free_object (void * object TSRMLS_DC ) /* {{{ */
143
131
{
@@ -163,6 +151,34 @@ zend_object_value php_phongo_objectid_create_object(zend_class_entry *class_type
163
151
164
152
return retval ;
165
153
} /* }}} */
154
+
155
+ static int php_phongo_objectid_compare_objects (zval * o1 , zval * o2 TSRMLS_DC ) /* {{{ */
156
+ {
157
+ php_phongo_objectid_t * intern1 ;
158
+ php_phongo_objectid_t * intern2 ;
159
+
160
+ intern1 = (php_phongo_objectid_t * )zend_object_store_get_object (o1 TSRMLS_CC );
161
+ intern2 = (php_phongo_objectid_t * )zend_object_store_get_object (o2 TSRMLS_CC );
162
+
163
+ return strcmp (intern1 -> oid , intern2 -> oid );
164
+ } /* }}} */
165
+
166
+ HashTable * php_phongo_objectid_get_debug_info (zval * object , int * is_temp TSRMLS_DC ) /* {{{ */
167
+ {
168
+ php_phongo_objectid_t * intern ;
169
+ zval retval = zval_used_for_init ;
170
+
171
+
172
+ * is_temp = 1 ;
173
+ intern = (php_phongo_objectid_t * )zend_object_store_get_object (object TSRMLS_CC );
174
+
175
+ array_init_size (& retval , 6 );
176
+
177
+ add_assoc_stringl_ex (& retval , ZEND_STRS ("oid" ), intern -> oid , 24 , 1 );
178
+
179
+ return Z_ARRVAL (retval );
180
+
181
+ } /* }}} */
166
182
/* }}} */
167
183
168
184
/* {{{ PHP_MINIT_FUNCTION */
@@ -179,6 +195,7 @@ PHP_MINIT_FUNCTION(ObjectID)
179
195
180
196
memcpy (& php_phongo_handler_objectid , phongo_get_std_object_handlers (), sizeof (zend_object_handlers ));
181
197
php_phongo_handler_objectid .compare_objects = php_phongo_objectid_compare_objects ;
198
+ php_phongo_handler_objectid .get_debug_info = php_phongo_objectid_get_debug_info ;
182
199
183
200
184
201
return SUCCESS ;
0 commit comments