PHP Class Metaregistrar\EPP\eppConnection

Show file Open project: metaregistrar/php-epp-client Class Usage Examples

Protected Properties

Property Type Description
$allow_self_signed boolean Allow/Deny self signed certificates
$checktransactionids
$connected Is the client connected to the server
$connection resource
$defaultnamespace string Default namespace
$exturi Object extensions
$hostname string Hostname of this connection
$language language for epp
$launchphase
$local_cert_path string Path to certificate file
$local_cert_pwd string Password of certificate file
$logentries
$loggedin Is the client logged in to the server
$logging boolean
$newpassword * New password for password change procedure
$objuri Base objects
$password string Password to be used in the connection
$port string Port of the connection
$responses array Commands and equivalent responses
$retry * Number of times read operations will be retried
$rootspace These namespaces are needed in the root of the EPP object
$timeout integer Time-out value for the server connection
$username string Username to be used in the connection
$version version for epp
$xpathuri Base objects

Public Methods

Method Description
HandleXmlError ( integer $errno, string $errstr, string $errfile, string $errline ) : boolean Error handler for loadxml() so that a nice exception is thrown
__construct ( $logging = false, $settingsfile = null )
__destruct ( )
addCommandResponse ( $command, $response )
addDefaultNamespace ( $xmlns, $namespace )
addExtension ( string $xmlns, string $namespace )
addService ( string $xmlns, string $namespace ) Add a service to the list of services
connect ( null $hostname = null, integer $port = null ) : boolean Connect to the address and port
create ( string $configfile, boolean | false $debug = false ) : mixed
createResponse ( $request )
disableCertification ( )
disableDnssec ( )
disableRgp ( )
disconnect ( ) : boolean Disconnects if connected
enableCertification ( string $certificatepath, string | null $certificatepassword, boolean $selfsigned = false )
enableDnssec ( )
enableLaunchphase ( $launchphase )
enableRgp ( )
getCheckTransactionIds ( )
getDefaultNamespaces ( )
getExtensions ( )
getHostname ( )
getLanguage ( )
getLaunchphase ( )
getNewPassword ( )
getPassword ( )
getPort ( )
getResponses ( )
getRetry ( )
getServices ( ) : array Get all supported services
getTimeout ( )
getUsername ( )
getVersion ( )
getXpathExtensions ( )
isConnected ( ) : boolean Returns if the session is still open
isLoggedin ( ) : boolean Return if the system is still logged in
login ( ) : boolean Performs an EPP login request and checks the result
logout ( ) : boolean Performs an EPP logout and checks the result
read ( boolean $nonBlocking = false ) : string This will read 1 response from the connection if there is one
readResponse ( ) : eppResponse Reads a response asynchronously.
removeExtension ( $namespace )
request ( eppRequest $eppRequest ) : eppResponse | null
setCheckTransactionIds ( $value )
setConnectionDetails ( $settingsfile )
setExtensions ( array $extensions ) Set all extensions in one call
setHostname ( $hostname )
setLanguage ( $language )
setNewPassword ( $password )
setPassword ( $password )
setPort ( $port )
setRetry ( $retry )
setServices ( array $services ) Set service list with one call
setTimeout ( $timeout )
setUsername ( $username )
setVersion ( $version )
setXpathExtensions ( $extensions )
write ( string $content ) : boolean Write stuff over the EPP connection
writeRequest ( eppRequest $content ) : boolean Writes a request object to the stream
writeandread ( eppRequest $content ) : eppResponse Write the content domDocument to the stream Read the answer Load the answer in a response domDocument return the reponse

Protected Methods

Method Description
loadSettings ( $directory, $settingsfile )
writeLog ( $text, $action )

Private Methods

Method Description
addInteger ( string $content ) : string This adds the content-length to the content that is about to be written over the EPP Protocol
enableLogging ( )
readInteger ( string $content ) : integer This parses the first 4 bytes into an integer for use to compare content-length
showLog ( )

Method Details

HandleXmlError() public method

Error handler for loadxml() so that a nice exception is thrown
public HandleXmlError ( integer $errno, string $errstr, string $errfile, string $errline ) : boolean
$errno integer
$errstr string
$errfile string
$errline string
return boolean

__construct() public method

public __construct ( $logging = false, $settingsfile = null )

__destruct() public method

public __destruct ( )

addCommandResponse() public method

public addCommandResponse ( $command, $response )

addDefaultNamespace() public method

public addDefaultNamespace ( $xmlns, $namespace )

addExtension() public method

public addExtension ( string $xmlns, string $namespace )
$xmlns string
$namespace string

addService() public method

Add a service to the list of services
public addService ( string $xmlns, string $namespace )
$xmlns string
$namespace string

connect() public method

Connect to the address and port
public connect ( null $hostname = null, integer $port = null ) : boolean
$hostname null
$port integer
return boolean

create() static public method

static public create ( string $configfile, boolean | false $debug = false ) : mixed
$configfile string
$debug boolean | false
return mixed

createResponse() public method

public createResponse ( $request )

disableCertification() public method

disableDnssec() public method

public disableDnssec ( )

disableRgp() public method

public disableRgp ( )

disconnect() public method

Disconnects if connected
public disconnect ( ) : boolean
return boolean

enableCertification() public method

public enableCertification ( string $certificatepath, string | null $certificatepassword, boolean $selfsigned = false )
$certificatepath string
$certificatepassword string | null
$selfsigned boolean

enableDnssec() public method

public enableDnssec ( )

enableLaunchphase() public method

public enableLaunchphase ( $launchphase )

enableRgp() public method

public enableRgp ( )

getCheckTransactionIds() public method

getDefaultNamespaces() public method

getExtensions() public method

public getExtensions ( )

getHostname() public method

public getHostname ( )

getLanguage() public method

public getLanguage ( )

getLaunchphase() public method

public getLaunchphase ( )

getNewPassword() public method

public getNewPassword ( )

getPassword() public method

public getPassword ( )

getPort() public method

public getPort ( )

getResponses() public method

public getResponses ( )

getRetry() public method

public getRetry ( )

getServices() public method

Get all supported services
public getServices ( ) : array
return array

getTimeout() public method

public getTimeout ( )

getUsername() public method

public getUsername ( )

getVersion() public method

public getVersion ( )

getXpathExtensions() public method

public getXpathExtensions ( )

isConnected() public method

Returns if the session is still open
public isConnected ( ) : boolean
return boolean

isLoggedin() public method

Return if the system is still logged in
public isLoggedin ( ) : boolean
return boolean

loadSettings() protected method

protected loadSettings ( $directory, $settingsfile )

login() public method

Performs an EPP login request and checks the result
public login ( ) : boolean
return boolean

logout() public method

Performs an EPP logout and checks the result
public logout ( ) : boolean
return boolean

read() public method

This will read 1 response from the connection if there is one
public read ( boolean $nonBlocking = false ) : string
$nonBlocking boolean to prevent the blocking of the thread in case there is nothing to read and not wait for the timeout
return string

readResponse() public method

Warning if you don't retrieve the read this before you disconnect your response may be lost please check if your object you are awaiting is supported in the eppResponse object by looking at the eppResponse object's array property named "matcher"
public readResponse ( ) : eppResponse
return eppResponse

removeExtension() public method

public removeExtension ( $namespace )

request() public method

public request ( eppRequest $eppRequest ) : eppResponse | null
$eppRequest eppRequest
return eppResponse | null

setCheckTransactionIds() public method

public setCheckTransactionIds ( $value )

setConnectionDetails() public method

public setConnectionDetails ( $settingsfile )

setExtensions() public method

Set all extensions in one call
public setExtensions ( array $extensions )
$extensions array

setHostname() public method

public setHostname ( $hostname )

setLanguage() public method

public setLanguage ( $language )

setNewPassword() public method

public setNewPassword ( $password )

setPassword() public method

public setPassword ( $password )

setPort() public method

public setPort ( $port )

setRetry() public method

public setRetry ( $retry )

setServices() public method

Set service list with one call
public setServices ( array $services )
$services array

setTimeout() public method

public setTimeout ( $timeout )

setUsername() public method

public setUsername ( $username )

setVersion() public method

public setVersion ( $version )

setXpathExtensions() public method

public setXpathExtensions ( $extensions )

write() public method

Write stuff over the EPP connection
public write ( string $content ) : boolean
$content string
return boolean

writeLog() protected method

protected writeLog ( $text, $action )

writeRequest() public method

Writes a request object to the stream
public writeRequest ( eppRequest $content ) : boolean
$content eppRequest
return boolean

writeandread() public method

Write the content domDocument to the stream Read the answer Load the answer in a response domDocument return the reponse
public writeandread ( eppRequest $content ) : eppResponse
$content eppRequest
return eppResponse

Property Details

$allow_self_signed protected property

Allow/Deny self signed certificates
protected bool $allow_self_signed
return boolean

$checktransactionids protected property

protected $checktransactionids

$connected protected property

Is the client connected to the server
protected $connected

$connection protected property

protected resource $connection
return resource

$defaultnamespace protected property

Default namespace
protected string $defaultnamespace
return string

$exturi protected property

Object extensions
protected $exturi

$hostname protected property

Hostname of this connection
protected string $hostname
return string

$language protected property

language for epp
protected $language

$launchphase protected property

protected $launchphase

$local_cert_path protected property

Path to certificate file
protected string $local_cert_path
return string

$local_cert_pwd protected property

Password of certificate file
protected string $local_cert_pwd
return string

$logentries protected property

protected $logentries

$loggedin protected property

Is the client logged in to the server
protected $loggedin

$logging protected property

protected bool $logging
return boolean

$newpassword protected property

* New password for password change procedure
protected $newpassword

$objuri protected property

Base objects
protected $objuri

$password protected property

Password to be used in the connection
protected string $password
return string

$port protected property

Port of the connection
protected string $port
return string

$responses protected property

Commands and equivalent responses
protected array $responses
return array

$retry protected property

* Number of times read operations will be retried
protected $retry

$rootspace protected property

These namespaces are needed in the root of the EPP object
protected $rootspace

$timeout protected property

Time-out value for the server connection
protected int $timeout
return integer

$username protected property

Username to be used in the connection
protected string $username
return string

$version protected property

version for epp
protected $version

$xpathuri protected property

Base objects
protected $xpathuri