PHP Класс opensrs\Base

С версии: 3.4
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$defaultTlds
$requiredFields classes that don't have any fields

Защищенные свойства (Protected)

Свойство Тип Описание
$_opsHandler seconds
$protocol

Открытые методы

Метод Описание
__construct ( ) openSRS_base object constructor.
__destruct ( ) openSRS_base object destructor.
_validateObject ( $dataObject, $requiredFields = null ) Method for any shared validation that is applicable to all API calls. Checks API call class for requiredFields array and checks all fields on $dataObject against it to make sure all fields in requiredFields are set and have a value THIS DOES NOT VALIDATE THAT THE VALUE IS VALID!
convertArray2Formatted ( $type = '', $data = '' )
getConfiguredTlds ( ) : array Get configured tlds for domain call Will use (in order of preference).
getDomain ( ) Get the domain from the dataObject.
hasDomain ( ) : boolean Does the dataObject have a domain set?
isValidField ( $value ) statement in _validateObject
is_connected ( ) : boolean Method to check if a socket connection exists.
send ( $dataObject, $returnFullResponse = true ) Send the oSRS API request, set action, object and protocol based on the call being made (so we don't have to set it in each call class), and run any custom response handling if the function 'customResponseHandling' exists on $obj, the class for that specific API call.
send_cmd ( string $request ) : string Method to send a command to the server.
setDataObject ( $format, $dataObject )

Приватные методы

Метод Описание
_verifySystemProperties ( ) Method to check the PHP version and OpenSSL PHP lib installation.
close_socket ( ) Method to close the socket connection.
init_socket ( ) : boolean Method to initialize a socket connection to the OpenSRS server.
readData ( &$fh, $timeout = 5 ) : mixed Reads data from a socket.
readHeader ( $fh, $timeout = 5 ) : hash Reads header data.
read_data ( ) : string Method to read data from the buffer stream.
send_data ( string $message ) : string Method to send data.
writeData ( &$fh, string $msg ) Writes a message to a socket (buffered IO).

Описание методов

__construct() публичный метод

Closes an existing socket connection, if we have one
С версии: 3.1
public __construct ( )

__destruct() публичный метод

Closes an existing socket connection, if we have one
С версии: 3.4
public __destruct ( )

_validateObject() публичный метод

Method for any shared validation that is applicable to all API calls. Checks API call class for requiredFields array and checks all fields on $dataObject against it to make sure all fields in requiredFields are set and have a value THIS DOES NOT VALIDATE THAT THE VALUE IS VALID!
public _validateObject ( $dataObject, $requiredFields = null )

convertArray2Formatted() публичный метод

public convertArray2Formatted ( $type = '', $data = '' )

getConfiguredTlds() публичный метод

.. 1. selected tlds 2. supplied default tlds 3. included default tlds.
public getConfiguredTlds ( ) : array
Результат array tlds

getDomain() публичный метод

Get the domain from the dataObject.
public getDomain ( )

hasDomain() публичный метод

Does the dataObject have a domain set?
public hasDomain ( ) : boolean
Результат boolean

isValidField() публичный метод

statement in _validateObject
public isValidField ( $value )

is_connected() публичный метод

Method to check if a socket connection exists.
С версии: 3.4
public is_connected ( ) : boolean
Результат boolean True if connected

send() публичный метод

Send the oSRS API request, set action, object and protocol based on the call being made (so we don't have to set it in each call class), and run any custom response handling if the function 'customResponseHandling' exists on $obj, the class for that specific API call.
public send ( $dataObject, $returnFullResponse = true )

send_cmd() публичный метод

Method to send a command to the server.
С версии: 3.1
public send_cmd ( string $request ) : string
$request string Raw XML request
Результат string $data Raw XML response

setDataObject() публичный метод

public setDataObject ( $format, $dataObject )

Описание свойств

$_opsHandler защищенное свойство

seconds
protected $_opsHandler

$defaultTlds публичное свойство

public $defaultTlds

$protocol защищенное свойство

protected $protocol

$requiredFields публичное свойство

classes that don't have any fields
public $requiredFields