Class shardimage\shardimagephpapi\web\parsers\BaseRawMessage
Inheritance | shardimage\shardimagephpapi\web\parsers\BaseRawMessage |
---|---|
Subclasses | shardimage\shardimagephpapi\web\parsers\RawRequest, shardimage\shardimagephpapi\web\parsers\RawResponse |
Raw HTTP message object.
Public Properties
Property | Type | Description | Defined By |
---|---|---|---|
$body | string | Body | shardimage\shardimagephpapi\web\parsers\BaseRawMessage |
$boundary | string | Boundary of a multipart message | shardimage\shardimagephpapi\web\parsers\BaseRawMessage |
$customHeaders | string[] | Custom headers (e.g. X-Some-Header) | shardimage\shardimagephpapi\web\parsers\BaseRawMessage |
$headers | string[] | Headers | shardimage\shardimagephpapi\web\parsers\BaseRawMessage |
$message | string | HTTP message | shardimage\shardimagephpapi\web\parsers\BaseRawMessage |
$parts | string[] | Body segments of a multipart message | shardimage\shardimagephpapi\web\parsers\BaseRawMessage |
$type | string | Content type | shardimage\shardimagephpapi\web\parsers\BaseRawMessage |
Protected Properties
Property | Type | Description | Defined By |
---|---|---|---|
$service | shardimage\shardimagephpapi\services\BaseService | Service | shardimage\shardimagephpapi\web\parsers\BaseRawMessage |
Public Methods
Method | Description | Defined By |
---|---|---|
__construct() | Creates and parses a HTTP message. | shardimage\shardimagephpapi\web\parsers\BaseRawMessage |
isFile() | Returns whether the message is a file. | shardimage\shardimagephpapi\web\parsers\BaseRawMessage |
Protected Methods
Method | Description | Defined By |
---|---|---|
buildHeaders() | Builds the headers string from a PSR message. | shardimage\shardimagephpapi\web\parsers\BaseRawMessage |
decodeMessage() | Decodes a message. | shardimage\shardimagephpapi\web\parsers\BaseRawMessage |
getBoundary() | Returns the boundary of a multipart message. | shardimage\shardimagephpapi\web\parsers\BaseRawMessage |
getParts() | Returns the body segments of a multipart message. | shardimage\shardimagephpapi\web\parsers\BaseRawMessage |
getType() | Returns the content type. | shardimage\shardimagephpapi\web\parsers\BaseRawMessage |
parse() | Parses the message. | shardimage\shardimagephpapi\web\parsers\BaseRawMessage |
parseHeaders() | Parses the headers into arrays. | shardimage\shardimagephpapi\web\parsers\BaseRawMessage |
Property Details
Body
Boundary of a multipart message
Custom headers (e.g. X-Some-Header)
Headers
HTTP message
Body segments of a multipart message
Service
Content type
Method Details
Creates and parses a HTTP message.
public void __construct ( $service, $message ) | ||
$service | shardimage\shardimagephpapi\services\BaseService | Service |
$message | string|\Psr\Http\Message\RequestInterface|\Psr\Http\Message\ResponseInterface |
Builds the headers string from a PSR message.
protected string buildHeaders ( $message ) | ||
$message | \Psr\Http\Message\RequestInterface|\Psr\Http\Message\ResponseInterface |
Decodes a message.
protected void decodeMessage ( $message ) | ||
$message | string|\Psr\Http\Message\RequestInterface|\Psr\Http\Message\ResponseInterface | |
throws | shardimage\shardimagephpapi\base\exceptions\InvalidCallException |
---|
Returns the boundary of a multipart message.
protected string|null getBoundary ( ) |
Returns the body segments of a multipart message.
protected string[] getParts ( ) |
Returns the content type.
protected string getType ( ) |
Returns whether the message is a file.
public boolean isFile ( ) |
Parses the message.
protected void parse ( ) | ||
throws | shardimage\shardimagephpapi\base\exceptions\InvalidCallException |
---|
Parses the headers into arrays.
protected void parseHeaders ( $headers ) | ||
$headers | string |