The HttpMessage class
(PECL pecl_http >= 0.10.0)
Class synopsis
static public
HttpMessage fromString
([ string
}$raw_message
[, string $class_name
= "HttpMessage"
]] )Class Members
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 operations.
Predefined Constants
Type | Name | Description |
---|---|---|
int | TYPE_NONE | message has is of no specific type |
int | TYPE_REQUEST | message is a request style HTTP message |
int | TYPE_RESPONSE | message is a response style HTTP message |
Table of Contents
- HttpMessage::addHeaders — Add headers
- HttpMessage::__construct — HttpMessage constructor
- HttpMessage::detach — Detach HttpMessage
- HttpMessage::factory — Create HttpMessage from string
- HttpMessage::fromEnv — Create HttpMessage from environment
- HttpMessage::fromString — Create HttpMessage from string
- HttpMessage::getBody — Get message body
- HttpMessage::getHeader — Get header
- HttpMessage::getHeaders — Get message headers
- HttpMessage::getHttpVersion — Get HTTP version
- HttpMessage::getParentMessage — Get parent message
- HttpMessage::getRequestMethod — Get request method
- HttpMessage::getRequestUrl — Get request URL
- HttpMessage::getResponseCode — Get response code
- HttpMessage::getResponseStatus — Get response status
- HttpMessage::getType — Get message type
- HttpMessage::guessContentType — Guess content type
- HttpMessage::prepend — Prepend message(s)
- HttpMessage::reverse — Reverse message chain
- HttpMessage::send — Send message
- HttpMessage::setBody — Set message body
- HttpMessage::setHeaders — Set headers
- HttpMessage::setHttpVersion — Set HTTP version
- HttpMessage::setRequestMethod — Set request method
- HttpMessage::setRequestUrl — Set request URL
- HttpMessage::setResponseCode — Set response code
- HttpMessage::setResponseStatus — Set response status
- HttpMessage::setType — Set message type
- HttpMessage::toMessageTypeObject — Create HTTP object regarding message type
- HttpMessage::toString — Get string representation
[an error occurred while processing the directive]
- Введение
- Установка и настройка
- Предопределенные константы
- Options usable with the HttpRequest class and request functions
- The HttpDeflateStream class
- The HttpInflateStream class
- The HttpMessage class
- The HttpQueryString class
- The HttpRequest
- The HttpRequestPool class
- The HttpResponse
- HTTP Функции
Коментарии
404 Not Found