HTTPMESSAGE(3) 1 HTTPMESSAGE(3)
The HttpMessage class
CLASS SYNOPSIS
HttpMessage
HttpMessageIteratorCountableSerializable
o public void HttpMessage::addHeaders (array $headers, [bool $append = false])
o public HttpMessage::__construct ([string $message])
o public HttpMessage HttpMessage::detach (void )
o static public HttpMessage HttpMessage::factory ([string $raw_message], [string $class_name = "HttpMessage"])
o static public HttpMessage HttpMessage::fromEnv (int $message_type, [string $class_name = "HttpMessage"])
o static public HttpMessage HttpMessage::fromString ([string $raw_message], [string $class_name = "HttpMessage"])
o public string HttpMessage::getBody (void )
o public string HttpMessage::getHeader (string $header)
o public array HttpMessage::getHeaders (void )
o public string HttpMessage::getHttpVersion (void )
o public HttpMessage HttpMessage::getParentMessage (void )
o public string HttpMessage::getRequestMethod (void )
o public string HttpMessage::getRequestUrl (void )
o public int HttpMessage::getResponseCode (void )
o public string HttpMessage::getResponseStatus (void )
o public int HttpMessage::getType (void )
o public string HttpMessage::guessContentType (string $magic_file, [int $magic_mode = MAGIC_MIME])
o public void HttpMessage::prepend (HttpMessage $message, [bool $top = true])
o public HttpMessage HttpMessage::reverse (void )
o public bool HttpMessage::send (void )
o public void HttpMessage::setBody (string $body)
o public void HttpMessage::setHeaders (array $headers)
o public bool HttpMessage::setHttpVersion (string $version)
o public bool HttpMessage::setRequestMethod (string $method)
o public bool HttpMessage::setRequestUrl (string $url)
o public bool HttpMessage::setResponseCode (int $code)
o public bool HttpMessage::setResponseStatus (string $status)
o public void HttpMessage::setType (int $type)
o public HttpRequest|HttpResponse HttpMessage::toMessageTypeObject (void )
o public string HttpMessage::toString ([bool $include_parent = false])
CLASS MEMBERS
PROPERTIES
Instance Properties
+----------+-----------------------------+---+---+
|Modifiers | | | |
| | | | |
| | Type | | |
| | | | |
| | Name | | |
| | | | |
| | Description | | |
| | | | |
+----------+-----------------------------+---+---+
|protected | | | |
| | | | |
| | int | | |
| | | | |
| | type | | |
| | | | |
| | message type | | |
| | | | |
|protected | | | |
| | | | |
| | string | | |
| | | | |
| | body | | |
| | | | |
| | message body | | |
| | | | |
|protected | | | |
| | | | |
| | float | | |
| | | | |
| | httpVersion | | |
| | | | |
| | HTTP protocol version | | |
| | | | |
|protected | | | |
| | | | |
| | array | | |
| | | | |
| | headers | | |
| | | | |
| | message headers | | |
| | | | |
|protected | | | |
| | | | |
| | string | | |
| | | | |
| | requestMethod | | |
| | | | |
| | request method name | | |
| | | | |
|protected | | | |
| | | | |
| | requestUrl | | |
| | | | |
| | string | | |
| | | | |
| | request URL | | |
| | | | |
|protected | | | |
| | | | |
| | int | | |
| | | | |
| | responseCode | | |
| | | | |
| | response code | | |
| | | | |
|protected | | | |
| | | | |
| | string | | |
| | | | |
| | responseStatus | | |
| | | | |
| | response status message | | |
| | | | |
|protected | | | |
| | | | |
| | HttpMessage | | |
| | | | |
| | parentMessage | | |
| | | | |
| | reference to parent message | | |
| | | | |
+----------+-----------------------------+---+---+
Note
None of these default properties can be accessed by reference, array key/index notation nor be used in increment or decrement oper-
ations.
PREDEFINED CONSTANTS
+-----+--------------------------------------+---+
|Type | | |
| | | |
| | Name | |
| | | |
| | Description | |
| | | |
+-----+--------------------------------------+---+
|int | | |
| | | |
| | TYPE_NONE | |
| | | |
| | message has is of no specific type | |
| | | |
|int | | |
| | | |
| | TYPE_REQUEST | |
| | | |
| | message is a request style HTTP mes- | |
| | sage | |
| | | |
|int | | |
| | | |
| | TYPE_RESPONSE | |
| | | |
| | message is a response style HTTP | |
| | message | |
| | | |
+-----+--------------------------------------+---+
PHP Documentation Group HTTPMESSAGE(3)