Documentation

Stream extends AbstractClient

Table of Contents

$body  : string
Response body.
$code  : int
Response code.
$context  : resource
Stream context.
$contextOptions  : array<string|int, mixed>
Stream context options.
$contextParams  : array<string|int, mixed>
Stream context parameters.
$fields  : array<string|int, mixed>
Fields.
$httpResponseHeaders  : string
HTTP Response Headers.
$message  : string
Response message.
$method  : string
Method.
$mode  : string
Stream mode.
$options  : array<string|int, mixed>
CURL options.
$query  : string
Query.
$requestHeaders  : array<string|int, mixed>
Request headers.
$resource  : object
Client resource object.
$response  : string
Raw response string.
$responseHeader  : string
Raw response header.
$responseHeaders  : array<string|int, mixed>
Response headers.
$url  : string
URL.
$version  : string
HTTP version from response.
close()  : void
Close the client resource.
decodeBody()  : void
Decode the body.
getBody()  : string
Get the response body.
getCode()  : string
Get the response code.
getField()  : string
Get a field.
getHttpVersion()  : string
Get the response HTTP version.
getMessage()  : string
Get the response HTTP message.
getMethod()  : string
Get the method.
getQuery()  : string
Get the HTTP query.
getQueryLength()  : int
Get HTTP query length.
getRawResponseHeader()  : string
Get raw response header.
getRequestHeader()  : mixed
Get a request header.
getRequestHeaders()  : array<string|int, mixed>
Get all request headers.
getResource()  : resource
Get the resource.
getResponse()  : string
Get the raw response.
getResponseHeader()  : mixed
Get a response header.
getResponseHeaders()  : array<string|int, mixed>
Get all response headers.
getUrl()  : string
Get the URL.
hasRequestHeaders()  : bool
Determine if there are request headers.
hasResource()  : bool
Determine whether or not resource is available.
hasResponseHeaders()  : bool
Determine if there are response headers.
open()  : AbstractClient
Create and open the client resource.
prepareQuery()  : object
Prepare the HTTP query.
removeField()  : object
Remove a field.
send()  : void
Method to send the request and get the response.
setField()  : object
Set the fields.
setFields()  : object
Set fields.
setMethod()  : object
Set the method.
setRequestHeader()  : object
Set a request header.
setRequestHeaders()  : object
Set all request headers.
setUrl()  : object
Set the URL.

Properties

$body

Response body.

protected string $body = ''
Tags
since
1.0.0

$context

Stream context.

protected resource $context = null
Tags
since
1.0.0

$contextOptions

Stream context options.

protected array<string|int, mixed> $contextOptions = []
Tags
since
1.0.0

$contextParams

Stream context parameters.

protected array<string|int, mixed> $contextParams = []
Tags
since
1.0.0

$fields

Fields.

protected array<string|int, mixed> $fields = []
Tags
since
1.0.0

$httpResponseHeaders

HTTP Response Headers.

protected string $httpResponseHeaders = null
Tags
since
1.0.0

$message

Response message.

protected string $message = ''
Tags
since
1.0.0

$mode

Stream mode.

protected string $mode = 'r'
Tags
since
1.0.0

$options

CURL options.

protected array<string|int, mixed> $options = []
Tags
since
1.0.0

$requestHeaders

Request headers.

protected array<string|int, mixed> $requestHeaders = []
Tags
since
1.0.0

$resource

Client resource object.

protected object $resource = ''
Tags
since
1.0.0

$response

Raw response string.

protected string $response = ''
Tags
since
1.0.0

$responseHeader

Raw response header.

protected string $responseHeader = ''
Tags
since
1.0.0

$responseHeaders

Response headers.

protected array<string|int, mixed> $responseHeaders = []
Tags
since
1.0.0

$version

HTTP version from response.

protected string $version = ''
Tags
since
1.0.0

Methods

close()

Close the client resource.

public abstract close() : void
Tags
since
1.0.0
Return values
void

decodeBody()

Decode the body.

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

getBody()

Get the response body.

public getBody() : string
Tags
since
1.0.0
Return values
string

getCode()

Get the response code.

public getCode() : string
Tags
since
1.0.0
Return values
string

getField()

Get a field.

public getField((string) $name) : string
Parameters
$name : (string)

name of field

Tags
since
1.0.0
Return values
string

getHttpVersion()

Get the response HTTP version.

public getHttpVersion() : string
Tags
since
1.0.0
Return values
string

getMessage()

Get the response HTTP message.

public getMessage() : string
Tags
since
1.0.0
Return values
string

getMethod()

Get the method.

public getMethod() : string
Tags
since
1.0.0
Return values
string

getQuery()

Get the HTTP query.

public getQuery() : string
Tags
since
1.0.0
Return values
string

getQueryLength()

Get HTTP query length.

public getQueryLength([(bool) $mb = true ]) : int
Parameters
$mb : (bool) = true
Tags
since
1.0.0
Return values
int

getRawResponseHeader()

Get raw response header.

public getRawResponseHeader() : string
Tags
since
1.0.0
Return values
string

getRequestHeader()

Get a request header.

public getRequestHeader((string) $name) : mixed
Parameters
$name : (string)
Tags
since
1.0.0
Return values
mixed

getRequestHeaders()

Get all request headers.

public getRequestHeaders() : array<string|int, mixed>
Tags
since
1.0.0
Return values
array<string|int, mixed>

getResource()

Get the resource.

public getResource() : resource
Tags
since
1.0.0
Return values
resource

getResponse()

Get the raw response.

public getResponse() : string
Tags
since
1.0.0
Return values
string

getResponseHeader()

Get a response header.

public getResponseHeader((string) $name) : mixed
Parameters
$name : (string)
Tags
since
1.0.0
Return values
mixed

getResponseHeaders()

Get all response headers.

public getResponseHeaders() : array<string|int, mixed>
Tags
since
1.0.0
Return values
array<string|int, mixed>

getUrl()

Get the URL.

public getUrl() : string
Tags
since
1.0.0
Return values
string

hasRequestHeaders()

Determine if there are request headers.

public hasRequestHeaders() : bool
Tags
since
1.0.0
Return values
bool

hasResource()

Determine whether or not resource is available.

public hasResource() : bool
Tags
since
1.0.0
Return values
bool

hasResponseHeaders()

Determine if there are response headers.

public hasResponseHeaders() : bool
Tags
since
1.0.0
Return values
bool

prepareQuery()

Prepare the HTTP query.

public prepareQuery() : object
Tags
since
1.0.0
Return values
object

removeField()

Remove a field.

public removeField((string) $name) : object
Parameters
$name : (string)

name of field

Tags
since
1.0.0
Return values
object

send()

Method to send the request and get the response.

public abstract send() : void
Tags
since
1.0.0
Return values
void

setField()

Set the fields.

public setField((string) $name, mixed $value) : object
Parameters
$name : (string)

(string) $value

$value : mixed
Tags
since
1.0.0
Return values
object

setFields()

Set fields.

public setFields((array) $fields) : object
Parameters
$fields : (array)
Tags
since
1.0.0
Return values
object

setMethod()

Set the method.

public setMethod((string) $method) : object
Parameters
$method : (string)
Tags
since
1.0.0
Return values
object

setRequestHeader()

Set a request header.

public setRequestHeader((string) $name, (string) $value) : object
Parameters
$name : (string)
$value : (string)
Tags
since
1.0.0
Return values
object

setRequestHeaders()

Set all request headers.

public setRequestHeaders((\alphaz\http\Clients\arryay) $headers) : object
Parameters
$headers : (\alphaz\http\Clients\arryay)
Tags
since
1.0.0
Return values
object

setUrl()

Set the URL.

public setUrl((string) $url) : object
Parameters
$url : (string)
Tags
since
1.0.0
Return values
object

Search results