- MAKE_STD_ZVAL(headers);
- array_init(headers);
- zend_hash_copy(Z_ARRVAL_P(headers), &msg->hdrs, (copy_ctor_func_t) zval_add_ref, NULL, sizeof(zval *));
- ASSOC_PROP(zval, "headers", headers);
-
- MAKE_STD_ZVAL(body);
- if (!obj->body) {
- php_http_new(NULL, php_http_message_body_class_entry, (php_http_new_t) php_http_message_body_object_new_ex, NULL, (void *) php_http_message_body_init(&obj->message->body, NULL TSRMLS_CC), (void *) &obj->body TSRMLS_CC);
- }
- ZVAL_OBJVAL(body, obj->body->zv, 1);
- ASSOC_PROP(zval, "body", body);
-
- MAKE_STD_ZVAL(parent);
- if (msg->parent) {
- ZVAL_OBJVAL(parent, obj->parent->zv, 1);
- } else {
- ZVAL_NULL(parent);
- }
- ASSOC_PROP(zval, "parentMessage", parent);