public int $contentLength
public int $bytesRemaining = -1
private bool $headersParsed
public __construct(?int $status, array $headers = [], string $version = 'HTTP/1.1'): void
Parameter | Type | Description |
---|
$status | int | |
$headers | array | |
$version | string | |
Magic method to allow access to headers as properties.
public __get(string $key): string
Parameter | Type | Description |
---|
$key | string | The header key to get |
public setStatus(int $status): void
Parameter | Type | Description |
---|
$status | int | |
public write(string $string): void
Parameter | Type | Description |
---|
$string | string | |
public read(string $buffer): bool
Parameter | Type | Description |
---|
$buffer | string | |
public hasHeader(string $key): bool
Parameter | Type | Description |
---|
$key | string | |
Get a header from the response.
public getHeader(string $header): string
Parameter | Type | Description |
---|
$header | string | The header key to get |
public setHeader(string $header, ?string $content): void
Parameter | Type | Description |
---|
$header | string | |
$content | string | |
public toString(): string
public getStatusMessage(?int $code): string
Parameter | Type | Description |
---|
$code | int | |
Get the content type of the response.
public getContentType(array $args = []): string
This method will return the content type of the response and optionally return any arguments that were
Parameter | Type | Description |
---|
$args | array | The arguments of the content type header will be returned in this array |
public body(bool $raw = false): mixed
Parameter | Type | Description |
---|
$raw | bool | |
public decrypt(string $key, ?string $cipher): bool
Parameter | Type | Description |
---|
$key | string | |
$cipher | string | |
Generated by Hazaar API Doc Generator