Documentation

LicenseCommunicator
in package

Communicates with "the internet" to update a license

Tags
author

Michael Ritter michael.ritter@comvation.com

Table of Contents

Properties

$instance  : mixed
$javascriptRegistered  : mixed
$lastUpdate  : mixed
$requestInterval  : mixed

Methods

__construct()  : mixed
addJsUpdateCode()  : mixed
Registers the javascript code to update a license
getInstance()  : LicenseCommunicator
Singleton accessor
isTimeToUpdate()  : bool
Tells wheter its time to update or not
update()  : null
Updates the license
fetchResponse()  : mixed

Properties

Methods

addJsUpdateCode()

Registers the javascript code to update a license

public addJsUpdateCode(array<string|int, mixed> &$_CORELANG, mixed $license[, mixed $intern = false ][, bool $autoexec = true ]) : mixed
Parameters
$_CORELANG : array<string|int, mixed>

Core language array

$license : mixed
$intern : mixed = false
$autoexec : bool = true

(optional) Wheter to perform update check automaticly or on form submit

isTimeToUpdate()

Tells wheter its time to update or not

public isTimeToUpdate() : bool
Return values
bool

True if license is outdated, false otherwise

update()

Updates the license

public update(License &$license, array<string|int, mixed> $_CONFIG[, bool $forceUpdate = false ][, bool $forceTemplate = false ][, array<string|int, mixed> $_CORELANG = array() ][, string $response = '' ]) : null
Parameters
$license : License

The license to update

$_CONFIG : array<string|int, mixed>

The configuration array

$forceUpdate : bool = false

(optional) If set to true, update is performed even if time to update is not reached yet

$forceTemplate : bool = false

(optional) If set to true, the server is requested to send the template

$_CORELANG : array<string|int, mixed> = array()

(optional) Core language array

$response : string = ''

(optional) Server response as JSON. If this is set, no HTTP request is perfomed

Return values
null

fetchResponse()

protected fetchResponse(mixed $license, mixed $_CONFIG, mixed $forceTemplate, mixed $_CORELANG) : mixed
Parameters
$license : mixed
$_CONFIG : mixed
$forceTemplate : mixed
$_CORELANG : mixed

        
On this page

Search results