OXID eShop CE  4.10.7
 All Classes Namespaces Files Functions Variables Pages
oxOnlineLicenseCheck Class Reference
+ Collaboration diagram for oxOnlineLicenseCheck:

Public Member Functions

 setServersManager ($oServersManager)
 getServersManager ()
 setUserCounter ($oUserCounter)
 getUserCounter ()
 __construct ($oCaller)
 getErrorMessage ()
 isException ()
 validateShopSerials ()
 validateNewSerial ($sSerial)
 validate ($aSerials)

Public Attributes

const CONFIG_VAR_NAME = 'iOlcSuccess'

Protected Member Functions

 _setErrorMessage ($sErrorMessage)
 _getCaller ()
 _validateResponse ($oResponse)
 _formRequest ($aSerials)
 _formCounters ()
 _logSuccess ()
 _setIsException ($blIsException)
 _startGracePeriod ()
 _getUserCounter ()

Protected Attributes

 $_iValidResponseCode = 0
 $_sValidResponseMessage = 'ACK'
 $_aSerialKeys = array()
 $_sErrorMessage = ''
 $_blIsException = false
 $_oCaller = null
 $_oUserCounter = null
 $_oServersManager = null

Detailed Description

Performs Online License Key check.

Definition at line 11 of file oxonlinelicensecheck.php.

Constructor & Destructor Documentation

oxOnlineLicenseCheck::__construct (   $oCaller)

Sets dependencies.

Parameters
oxOnlineLicenseCheckCaller$oCaller

Definition at line 109 of file oxonlinelicensecheck.php.

Member Function Documentation

oxOnlineLicenseCheck::_formCounters ( )
protected

Forms shop counters array for sending to OXID server.

Returns
array

Definition at line 284 of file oxonlinelicensecheck.php.

oxOnlineLicenseCheck::_formRequest (   $aSerials)
protected

Builds request object with required parameters.

Parameters
array$aSerials
Exceptions
oxException
Returns
oxOnlineLicenseCheckRequest

Definition at line 253 of file oxonlinelicensecheck.php.

oxOnlineLicenseCheck::_getCaller ( )
protected

Gets caller.

Returns
oxOnlineLicenseCheckCaller

Definition at line 209 of file oxonlinelicensecheck.php.

oxOnlineLicenseCheck::_getUserCounter ( )
protected

Gets user counter.

Returns
oxUserCounter

Definition at line 342 of file oxonlinelicensecheck.php.

oxOnlineLicenseCheck::_logSuccess ( )
protected

Registers the latest Successful Online License check.

Definition at line 312 of file oxonlinelicensecheck.php.

oxOnlineLicenseCheck::_setErrorMessage (   $sErrorMessage)
protected

Set error message.

Parameters
string$sErrorMessageError message

Definition at line 199 of file oxonlinelicensecheck.php.

oxOnlineLicenseCheck::_setIsException (   $blIsException)
protected

Sets exception flag.

Parameters
bool$blIsExceptionException flag.

Definition at line 324 of file oxonlinelicensecheck.php.

oxOnlineLicenseCheck::_startGracePeriod ( )
protected

Starts grace period. Sets to config options.

Definition at line 333 of file oxonlinelicensecheck.php.

oxOnlineLicenseCheck::_validateResponse (   $oResponse)
protected

Performs a check of the response code and message.

Parameters
oxOnlineLicenseCheckResponse$oResponse
Exceptions
oxException
Returns
bool

Definition at line 223 of file oxonlinelicensecheck.php.

oxOnlineLicenseCheck::getErrorMessage ( )

Get error message.

Returns
string

Definition at line 119 of file oxonlinelicensecheck.php.

oxOnlineLicenseCheck::getServersManager ( )

Gets servers manager.

Returns
oxServersManager

Definition at line 78 of file oxonlinelicensecheck.php.

oxOnlineLicenseCheck::getUserCounter ( )

Gets user counter.

Returns
oxUserCounter

Definition at line 98 of file oxonlinelicensecheck.php.

oxOnlineLicenseCheck::isException ( )

Indicates whether the exception was thrown

Returns
bool

Definition at line 129 of file oxonlinelicensecheck.php.

oxOnlineLicenseCheck::setServersManager (   $oServersManager)

Sets servers manager.

Parameters
oxServersManager$oServersManager

Definition at line 68 of file oxonlinelicensecheck.php.

oxOnlineLicenseCheck::setUserCounter (   $oUserCounter)

Sets user counter.

Parameters
oxUserCounter$oUserCounter

Definition at line 88 of file oxonlinelicensecheck.php.

oxOnlineLicenseCheck::validate (   $aSerials)

The Online shop license check is performed. Returns check result.

Parameters
array$aSerialsSerial keys to be checked.
Returns
bool

Definition at line 169 of file oxonlinelicensecheck.php.

oxOnlineLicenseCheck::validateNewSerial (   $sSerial)

The Online shop license check for the new serial is performed. Returns check result.

Parameters
string$sSerialSerial to check.
Returns
bool

Definition at line 154 of file oxonlinelicensecheck.php.

oxOnlineLicenseCheck::validateShopSerials ( )

Takes active serial key and performs online license check in case it has never been performed before. In case of invalid license key, eShop is declared as unlicensed. In case of validation exception (eg. service can not be reached) the check is postponed until the next call.

Definition at line 139 of file oxonlinelicensecheck.php.

Member Data Documentation

oxOnlineLicenseCheck::$_aSerialKeys = array()
protected

Definition at line 38 of file oxonlinelicensecheck.php.

oxOnlineLicenseCheck::$_blIsException = false
protected

Definition at line 52 of file oxonlinelicensecheck.php.

oxOnlineLicenseCheck::$_iValidResponseCode = 0
protected

Definition at line 24 of file oxonlinelicensecheck.php.

oxOnlineLicenseCheck::$_oCaller = null
protected

Definition at line 55 of file oxonlinelicensecheck.php.

oxOnlineLicenseCheck::$_oServersManager = null
protected

Definition at line 61 of file oxonlinelicensecheck.php.

oxOnlineLicenseCheck::$_oUserCounter = null
protected

Definition at line 58 of file oxonlinelicensecheck.php.

oxOnlineLicenseCheck::$_sErrorMessage = ''
protected

Definition at line 45 of file oxonlinelicensecheck.php.

oxOnlineLicenseCheck::$_sValidResponseMessage = 'ACK'
protected

Definition at line 31 of file oxonlinelicensecheck.php.

const oxOnlineLicenseCheck::CONFIG_VAR_NAME = 'iOlcSuccess'

Variable name to be used in oxConfig table

Definition at line 17 of file oxonlinelicensecheck.php.


The documentation for this class was generated from the following file: