\FACTFinder\Core\ServerConnectionData

Represents all data belonging to a single connection. It holds all data necessary to configure a request and can also be filled with the corresponding response.

Summary

Methods
Properties
Constants
__construct()
getHttpHeaderFields()
setAction()
getAction()
getParameters()
setConnectionOption()
setConnectionOptions()
issetConnectionOption()
getConnectionOption()
getConnectionOptions()
setResponse()
setNullResponse()
getResponse()
getPreviousUrl()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$httpHeaderFields
$action
$parameters
$connectionOptions
$response
$previousUrl
N/A

Properties

$action

$action : string

Type

string

$connectionOptions

$connectionOptions : array<mixed,mixed>

Type

array<mixed,mixed>

$previousUrl

$previousUrl : string

Type

string

Methods

__construct()

__construct(\FACTFinder\Util\Parameters  $parameters = null) : \FACTFinder\Core\Server\type

Optionally takes a Parameters object to initialize the query parameters.

Parameters

\FACTFinder\Util\Parameters $parameters

Returns

\FACTFinder\Core\Server\type

getHttpHeaderFields()

getHttpHeaderFields() : \FACTFinder\Util\Parameters

Returns the parameters object used for the connection, on which HTTP header fields can be read and changed.

Returns

\FACTFinder\Util\Parameters

setAction()

setAction(string  $action) 

Set the action to be queried on the FACT-Finder server. e.g. "Search.ff".

Parameters

string $action

getAction()

getAction() : string

Get the action to be queried on the FACT-Finder server. e.g. "Search.ff".

Returns

string

getParameters()

getParameters() : \FACTFinder\Util\Parameters

Returns the parameters object used for the connection, on which query parameters can be read and changed.

Returns

\FACTFinder\Util\Parameters

setConnectionOption()

setConnectionOption(mixed  $name, mixed  $value) 

Set an option for the connection. This can be an arbitrary pair of key and value. How this is used depends on the kind of connection that is set up (e.g. cURL or socket). We simply provide an array to store options specific to this connection.

Parameters

mixed $name

The option's identifier. This can be any value that is a valid array index in PHP (hence, it SHOULD be a string or an integer; all other types will be interpreted as a string).

mixed $value

The option's value.

setConnectionOptions()

setConnectionOptions(array<mixed,mixed>  $options) 

Sets all given connection options at once. If an option with the same name already exists, the old value will be replaced. Options that are not contained in the $options parameter will retain their value(s).

Parameters

array<mixed,mixed> $options

An array of options. For more information on valid keys and values see setConnectionOption($name, $value).

issetConnectionOption()

issetConnectionOption(mixed  $name) : boolean

Parameters

mixed $name

The option's identifier.

Returns

boolean

getConnectionOption()

getConnectionOption(mixed  $name) : mixed

Parameters

mixed $name

The option's identifier.

Returns

mixed —

The option's value.

getConnectionOptions()

getConnectionOptions() : array<mixed,mixed>

Get an array of all set connection options.

Returns

array<mixed,mixed>

setResponse()

setResponse(\FACTFinder\Core\Server\Response  $response, string  $url) 

Set a response for the current connection settings along with the URL which was used to obtain the response.

Parameters

\FACTFinder\Core\Server\Response $response
string $url

The URL corresponding to $response.

setNullResponse()

setNullResponse() 

Set a null response - e.g. if the connection could not even be attempted at all.

getPreviousUrl()

getPreviousUrl() : string

Get the URL corresponding to the currently stored Response.

Returns

string