Documentation

Headers extends Client

Table of Contents

__construct()  : mixed
Get the headers.
curl()  : mixed
Access to curl clients.
get()  : bool|string
Determine if header exists.
gets()  : bool|string
Get all headers.
has()  : bool
Get the header by key.
normalizeKey()  : string
Normalize header name.
remove()  : void
Remove the header by key.
send()  : void
Send response.
sendHeaders()  : void
Send headers.
setHeader()  : void
append new header.
setHeaders()  : object
Set response headers.
update()  : void
Update existing header.

Methods

__construct()

Get the headers.

public __construct() : mixed
Tags
since
1.0.0
Return values
mixed

curl()

Access to curl clients.

public curl((string) $url[, mixed $method = 'GET' ][, array<string|int, mixed> $options = null ]) : mixed
Parameters
$url : (string)

(string) $method (array) $options

$method : mixed = 'GET'
$options : array<string|int, mixed> = null
Tags
since
1.0.0
Return values
mixed

get()

Determine if header exists.

public get((string) $key) : bool|string
Parameters
$key : (string)

The header key

Tags
since
1.0.0
Return values
bool|string

gets()

Get all headers.

public gets() : bool|string
Tags
since
1.0.0
Return values
bool|string

has()

Get the header by key.

public has((string) $key) : bool
Parameters
$key : (string)

The header key

Tags
since
1.0.0
Return values
bool

normalizeKey()

Normalize header name.

public normalizeKey((string) $key) : string
Parameters
$key : (string)

The case-insensitive header name

Return values
string

remove()

Remove the header by key.

public remove((string) $key) : void
Parameters
$key : (string)

The header key

Tags
since
1.0.0
Return values
void

send()

Send response.

public send([(int) $code = null ][, (array) $headers = null ][, (bool) $compress = false ]) : void
Parameters
$code : (int) = null

Status code.

$headers : (array) = null

Headers.

$compress : (bool) = false

Content compression.

Tags
since
1.0.0
Return values
void

sendHeaders()

Send headers.

public sendHeaders() : void
Tags
since
1.0.0
Return values
void

setHeader()

append new header.

public setHeader((string) $key, (string) $value) : void
Parameters
$key : (string)

The header key.

$value : (string)

The header value.

Tags
since
1.0.0
Return values
void

setHeaders()

Set response headers.

public setHeaders((array) $headers) : object
Parameters
$headers : (array)
Return values
object

update()

Update existing header.

public update((string) $key, (string) $value) : void
Parameters
$key : (string)

The header key

$value : (string)

The new header value

Tags
since
1.0.0
Return values
void

Search results