-/* {{{ void HttpMessage::__construct([string raw_message])
- *
- * Instantiate a new HttpMessage object based on the optionally provided
- * raw message. An HTTP Message can be either a response or a request.
- */
-PHP_METHOD(HttpMessage, __construct)
-{
- zval *message = NULL;
- getObject(http_message_object, obj);
-
- SET_EH_THROW_HTTP();
- if (SUCCESS == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|z/", &message)) {
- if (message) {
- convert_to_string(message);
- SET_PROP(obj, raw, message);
- }
- }
- SET_EH_NORMAL();
-}
-/* }}} */
-
-/* {{{ void HttpMessage::setRaw(string raw_message)
- *
- * Parse a new raw message.
- */
-PHP_METHOD(HttpMessage, setRaw)
-{
- zval *message;
- getObject(http_message_object, obj);
-
- if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z/", &message)) {
- return;
- }
-
- convert_to_string(message);
- SET_PROP(obj, raw, message);
-}
-/* }}} */
-
-/* {{{ string HttpMessage::getBody()