Lizmap Web Client Master

OGCResponse
in package

Table of Contents

Properties

$cached  : bool
$code  : int
$data  : iterable<string|int, mixed>|StreamInterface|string
$headers  : array<string|int, mixed>
$mime  : string

Methods

__construct()  : mixed
constructor.
getBodyAsStream()  : StreamInterface
Get the response's body as stream.
getBodyAsString()  : string
Get the response's body as string.
getCode()  : int
Get the HTTP status code of the response.
getHeaders()  : array<string|int, mixed>
Get the response's headers.
getMime()  : string
Get the MIME type of the response.
isCached()  : bool
Get is the response has been cached.

Properties

$cached

public bool $cached = false

the response has been cached

$code

public int $code

the HTTP status code of the response

$data

public iterable<string|int, mixed>|StreamInterface|string $data

the response body as a stream, an iterable or a string

$headers

public array<string|int, mixed> $headers = array()

the response headers

$mime

public string $mime

the MIME type of the response

Methods

__construct()

constructor.

public __construct(int $code, string $mime, iterable<string|int, mixed>|StreamInterface|string $data[, bool $cached = false ][, array<string|int, mixed> $headers = array() ]) : mixed
Parameters
$code : int

the HTTP status code of the response

$mime : string

the MIME type of the response

$data : iterable<string|int, mixed>|StreamInterface|string

the response body as a string

$cached : bool = false

the response has been cached, default value false

$headers : array<string|int, mixed> = array()

default value an empty array

getBodyAsStream()

Get the response's body as stream.

public getBodyAsStream() : StreamInterface
Return values
StreamInterface

getBodyAsString()

Get the response's body as string.

public getBodyAsString() : string
Return values
string

getCode()

Get the HTTP status code of the response.

public getCode() : int
Return values
int

getHeaders()

Get the response's headers.

public getHeaders() : array<string|int, mixed>
Return values
array<string|int, mixed>

getMime()

Get the MIME type of the response.

public getMime() : string
Return values
string

isCached()

Get is the response has been cached.

public isCached() : bool
Return values
bool

        
On this page

Search results