\FACTFinder\Core\ServerAbstractDataProvider

Data providers take care of retrieving pre-configured requests with FACT-Finder data, including the network connection if necessary.

Summary

Methods
Properties
Constants
__construct()
register()
unregister()
setConnectTimeout()
setTimeout()
loadResponse()
No public properties found
No constants found
No protected methods found
$configuration
$connectionData
N/A
No private methods found
$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.

$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.