\FACTFinder\Core\ServerEasyCurlDataProvider

This implementation retrieves the FACT-Finder data by using the "easy cURL interface" (I didn't even make that up; that's what cURL itself calls it: 'easy' as opposed to 'multi').

Responses are queried sequentially and lazily and are cached as long as parameters don't change.

Summary

Methods
Properties
Constants
__construct()
register()
unregister()
setConnectTimeout()
setTimeout()
loadResponse()
No public properties found
No constants found
No protected methods found
$configuration
$connectionData
$urlBuilder
$curl
$defaultCurlOptions
$necessaryCurlOptions
N/A
prepareHttpHeaders()
prepareParameters()
prepareConnectionOptions()
retrieveResponse()
logResult()
hasUrlChanged()
$log
$nextID
N/A

Properties

$connectionData

$connectionData : array<mixed,\FACTFinder\Core\Server\ConnectionData>

Type

array<mixed,\FACTFinder\Core\Server\ConnectionData> — Keys are IDs to identify each connection data object.

$defaultCurlOptions

$defaultCurlOptions : 

Type

$necessaryCurlOptions

$necessaryCurlOptions : 

Type

$nextID

$nextID : integer

Type

integer

Methods

register()

register(\FACTFinder\Core\Server\ConnectionData  $connectionData) 

Make a connection data object known to the data provider and obtain an ID for it (basically, a handle).

Parameters

\FACTFinder\Core\Server\ConnectionData $connectionData

The connection data object to be registered.

Throws

\FACTFinder\Core\Server\InvalidArgumentException

if the $id is already in use.

unregister()

unregister(mixed  $id) 

Remove all references to the connection data object identified by $id.

Parameters

mixed $id

The ID corresponding to the connection data object to be removed from the DataProvider.

setConnectTimeout()

setConnectTimeout(mixed  $id, integer  $timeout) 

Set the number of seconds to wait while trying to connect. Any particular implementation of this abstract class is free to ignore this timeout, but it should respect it if the underlying connection mechanism allows.

Parameters

mixed $id

The ID of the connection data for which to set the timeout.

integer $timeout

The timeout in seconds.

setTimeout()

setTimeout(mixed  $id, integer  $timeout) 

Set the number of seconds to wait for the entire request to complete. Any particular implementation of this abstract class is free to ignore this timeout, but it should respect it if the underlying connection mechanism allows.

Parameters

mixed $id

The ID of the connection data for which to set the timeout.

integer $timeout

The timeout in seconds.

loadResponse()

loadResponse(mixed  $id) : void

Load a response based on the current state of the connection data corresponding to $id and fill that ConnectionData object with this response.

Parameters

mixed $id

The ID of the connection data for which to retrieve a response.

prepareHttpHeaders()

prepareHttpHeaders(  $connectionData) 

Parameters

$connectionData

prepareParameters()

prepareParameters(  $connectionData) 

Parameters

$connectionData

prepareConnectionOptions()

prepareConnectionOptions(  $connectionData,   $httpHeaderFields,   $parameters) 

Parameters

$connectionData
$httpHeaderFields
$parameters

retrieveResponse()

retrieveResponse(  $connectionData) 

Parameters

$connectionData

logResult()

logResult(  $response) 

Parameters

$response

hasUrlChanged()

hasUrlChanged(  $id) 

Parameters

$id