abstract class AbstractSocketConfig (View source)

Shared base for all registrar SocketConfig implementations.

Concrete subclasses provide getPOSTDataParams() and their own $parameters array shaped to the API they target.

Properties

protected string $login

account name

protected string $pw

account password

protected string $oteUrl

API OT&E endpoint URL

protected string $liveUrl

API LIVE endpoint URL

protected int $socketTimeout

API socket timeout in seconds

protected bool $needsIDNConvert

Whether API command values need IDN conversion

protected string $roleSeparator

Separator character for role credentials

Methods

setLogin(string $value)

Set account name to use

string
getLogin()

Get current login

setPassword(string $value)

Set account password to use

string
getSession()

Get API Session ID in use

setSession(string $value = "")

Set API Session ID to use

setPersistent(bool $value = false)

Add persistent parameter to request (request API session)

bool
getPersistent()

Get persistent parameter

string
getOTEUrl()

Get OT&E endpoint URL

string
getLiveUrl()

Get LIVE endpoint URL

int
getSocketTimeout()

Get socket timeout in seconds

bool
getNeedsIDNConvert()

Get whether IDN conversion is needed

string
getRoleSeparator()

Get role separator character

array
getPOSTDataParams(array $command, bool $secured)

Get POST data container of connection data

string
getPOSTData(array $command = [], bool $secured = false)

Create POST data string out of connection data

Details

AbstractSocketConfig setLogin(string $value)

Set account name to use

Parameters

string $value

account name

Return Value

AbstractSocketConfig

string getLogin()

Get current login

Return Value

string

AbstractSocketConfig setPassword(string $value)

Set account password to use

Parameters

string $value

account password

Return Value

AbstractSocketConfig

string getSession()

Get API Session ID in use

Return Value

string

AbstractSocketConfig setSession(string $value = "")

Set API Session ID to use

Parameters

string $value

API Session ID

Return Value

AbstractSocketConfig

AbstractSocketConfig setPersistent(bool $value = false)

Add persistent parameter to request (request API session)

Parameters

bool $value

Return Value

AbstractSocketConfig

bool getPersistent()

Get persistent parameter

Return Value

bool

string getOTEUrl()

Get OT&E endpoint URL

Return Value

string

string getLiveUrl()

Get LIVE endpoint URL

Return Value

string

int getSocketTimeout()

Get socket timeout in seconds

Return Value

int

bool getNeedsIDNConvert()

Get whether IDN conversion is needed

Return Value

bool

string getRoleSeparator()

Get role separator character

Return Value

string

abstract protected array getPOSTDataParams(array $command, bool $secured)

Get POST data container of connection data

Parameters

array $command

API Command to request

bool $secured

if password has to be returned "hidden"

Return Value

array

string getPOSTData(array $command = [], bool $secured = false)

Create POST data string out of connection data

Parameters

array $command

API Command to request

bool $secured

if password has to be returned "hidden"

Return Value

string

POST data string