HumHub Documentation (unofficial)

AdapterInterface

An interface description for Laminas\Http\Client\Adapter classes.

These classes are used as connectors for Laminas\Http\Client, performing the tasks of connecting, writing, reading and closing connection to the server.

Table of Contents

Methods

close()  : mixed
Close the connection to the server
connect()  : mixed
Connect to the remote server
read()  : string
Read response from server
setOptions()  : mixed
Set the configuration array for the adapter
write()  : string
Send request to the remote server

Methods

connect()

Connect to the remote server

public connect(string $host[, int $port = 80 ][, bool $secure = false ]) : mixed
Parameters
$host : string
$port : int = 80
$secure : bool = false

read()

Read response from server

public read() : string
Return values
string

setOptions()

Set the configuration array for the adapter

public setOptions([array<string|int, mixed> $options = [] ]) : mixed
Parameters
$options : array<string|int, mixed> = []

write()

Send request to the remote server

public write(string $method, Uri $url[, string $httpVer = '1.1' ][, array<string|int, mixed> $headers = [] ][, string $body = '' ]) : string
Parameters
$method : string
$url : Uri
$httpVer : string = '1.1'
$headers : array<string|int, mixed> = []
$body : string = ''
Return values
string

Request as text


        
On this page

Search results