#define http_request_object_declare_default_properties() _http_request_object_declare_default_properties(TSRMLS_C)
static inline void _http_request_object_declare_default_properties(TSRMLS_D);
-#define http_request_object_clone_obj _http_request_object_clone_obj
-static inline zend_object_value _http_request_object_clone_obj(zval *object TSRMLS_DC);
zend_class_entry *http_request_object_ce;
zend_function_entry http_request_object_fe[] = {
* references the last received response. Use HttpMessage::getParentMessage()
* to access the data of previously sent requests whithin this request
* cycle.
+ *
+ * Note that the internal request message is immutable, that means that the
+ * request message received through HttpRequest::getRequestMessage() will
+ * always look the same for the same request, regardless of any changes you
+ * may have made to the returned object.
+ *
+ * Throws HttpMalformedHeadersException, HttpEncodingException.
*/
PHP_METHOD(HttpRequest, getRequestMessage)
{
SET_EH_THROW_HTTP();
if (msg = http_message_parse(PHPSTR_VAL(&obj->request), PHPSTR_LEN(&obj->request))) {
- RETVAL_OBJVAL(http_message_object_new_ex(http_message_object_ce, msg, NULL));
+ ZVAL_OBJVAL(return_value, http_message_object_new_ex(http_message_object_ce, msg, NULL));
}
SET_EH_NORMAL();
}
* The object references the last received response, use HttpMessage::getParentMessage()
* to access the data of previously sent requests and received responses.
*
- * Throws HttpMalformedHeaderException.
+ * Note that the internal history is immutable, that means that any changes
+ * you make the the message list won't affect a history message list newly
+ * created by another call to HttpRequest::getHistory().
+ *
+ * Throws HttpMalformedHeaderException, HttpEncodingException.
*/
PHP_METHOD(HttpRequest, getHistory)
{
SET_EH_THROW_HTTP();
if (msg = http_message_parse(PHPSTR_VAL(&obj->history), PHPSTR_LEN(&obj->history))) {
- RETVAL_OBJVAL(http_message_object_new_ex(http_message_object_ce, msg, NULL));
+ ZVAL_OBJVAL(return_value, http_message_object_new_ex(http_message_object_ce, msg, NULL));
}
SET_EH_NORMAL();
}