PHPXMLRPC 4.11.0

Http
in package
uses LoggerAware

Table of Contents

Properties

$logger  : mixed

Methods

getLogger()  : mixed
parseAcceptHeader()  : array<string|int, string>
Parses one of the http headers which can have a list of values with quality param.
parseResponseHeaders()  : array<string|int, mixed>
Parses HTTP an http response's headers and separates them from the body.
setLogger()  : void

Properties

Methods

parseAcceptHeader()

Parses one of the http headers which can have a list of values with quality param.

public parseAcceptHeader(string $header) : array<string|int, string>
Parameters
$header : string
Tags
see
https://www.rfc-editor.org/rfc/rfc7231#section-5.3.1
Return values
array<string|int, string>

parseResponseHeaders()

Parses HTTP an http response's headers and separates them from the body.

public parseResponseHeaders(string &$data[, bool $headersProcessed = false ][, int $debug = 0 ]) : array<string|int, mixed>
Parameters
$data : string

the http response, headers and body. It will be stripped of headers

$headersProcessed : bool = false

when true, we assume that response inflating and dechunking has been already carried out

$debug : int = 0

when > 0, logs to screen messages detailing info about the parsed data

Tags
throws
HttpException
todo

if $debug is < 0, we could avoid populating 'raw_data' in the returned value - but that would be a weird API... (note that we still need to always have headers parsed for content charset)

Return values
array<string|int, mixed>

with keys 'headers', 'cookies', 'raw_data' and 'status_code'

setLogger()

public static setLogger(mixed $logger) : void
Parameters
$logger : mixed

        
On this page

Search results