class AbstractTransport implements TransportInterface (View source)

The AbstractTransport class.

Methods

__construct(array|ArrayAccess $options = array())

Constructor.

ResponseInterface
request(RequestInterface $request)

Send a request to the server and return a Response object with the response.

mixed
getOption(string $name, mixed $default = null)

Get option value.

setOption(string $name, mixed $value)

Set option value.

array
getOptions()

Method to get property Options

setOptions(array $options)

Method to set property options

Details

at line line 35
__construct(array|ArrayAccess $options = array())

Constructor.

Parameters

array|ArrayAccess $options Client options object.

at line line 49
ResponseInterface request(RequestInterface $request)

Send a request to the server and return a Response object with the response.

Parameters

RequestInterface $request The request object to store request params.

Return Value

ResponseInterface

at line line 82
mixed getOption(string $name, mixed $default = null)

Get option value.

Parameters

string $name Option name.
mixed $default The default value if not exists.

Return Value

mixed The found value or default value.

at line line 100
AbstractTransport setOption(string $name, mixed $value)

Set option value.

Parameters

string $name Option name.
mixed $value The value you want to set in.

Return Value

AbstractTransport Return self to support chaining.

at line line 112
array getOptions()

Method to get property Options

Return Value

array

at line line 124
AbstractTransport setOptions(array $options)

Method to set property options

Parameters

array $options

Return Value

AbstractTransport Return self to support chaining.