Class shardimage\shardimagephpapi\web\parsers\BaseRawMessage

Inheritanceshardimage\shardimagephpapi\web\parsers\BaseRawMessage
Subclassesshardimage\shardimagephpapi\web\parsers\RawRequest, shardimage\shardimagephpapi\web\parsers\RawResponse

Raw HTTP message object.

Public Methods

Hide inherited methods

MethodDescriptionDefined 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

Property Details

$body public property

Body

public string $body null
$boundary public property

Boundary of a multipart message

public string $boundary null
$customHeaders public property

Custom headers (e.g. X-Some-Header)

public string[] $customHeaders = []
$headers public property

Headers

public string[] $headers = []
$message public property

HTTP message

public string $message null
$parts public property

Body segments of a multipart message

public string[] $parts null
$service protected property

Service

$type public property

Content type

public string $type null

Method Details

__construct() public method

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
buildHeaders() protected method

Builds the headers string from a PSR message.

protected string buildHeaders ( $message )
$message \Psr\Http\Message\RequestInterface|\Psr\Http\Message\ResponseInterface
decodeMessage() protected method

Decodes a message.

protected void decodeMessage ( $message )
$message string|\Psr\Http\Message\RequestInterface|\Psr\Http\Message\ResponseInterface
throws shardimage\shardimagephpapi\base\exceptions\InvalidCallException
getBoundary() protected method

Returns the boundary of a multipart message.

protected string|null getBoundary ( )
getParts() protected method

Returns the body segments of a multipart message.

protected string[] getParts ( )
getType() protected method

Returns the content type.

protected string getType ( )
isFile() public method

Returns whether the message is a file.

public boolean isFile ( )
parse() protected method

Parses the message.

protected void parse ( )
throws shardimage\shardimagephpapi\base\exceptions\InvalidCallException
parseHeaders() protected method

Parses the headers into arrays.

protected void parseHeaders ( $headers )
$headers string