Documentation

Register extends AbstractBase
in package

YetiForce register class.

Table of Contents

REGISTRATION_FILE  = ROOT_DIRECTORY . \DIRECTORY_SEPARATOR . 'app_data' . \DIRECTORY_SEPARATOR . 'registration.php'
STATUS_MESSAGES  = [-2 => 'ERR_NO_INTERNET_CONNECTION', -1 => 'ERR_IT_HAS_NO_BEEN_6_HOURS_SINCE_THE_LAST_CHECK', 0 => 'LBL_NOT_REGISTERED', 1 => 'LBL_WAITING_FOR_ACCEPTANCE', 2 => 'LBL_INCORRECT_DATA', 3 => 'LBL_INCOMPLETE_DATA', 8 => 'LBL_SPECIAL_REGISTRATION', 9 => 'LBL_REGISTERED']
URL  = 'https://api.yetiforce.eu/registrations'
$error  : string|null
$success  : bool
$config  : array<string|int, mixed>
Registration config cache.
$products  : array<string|int, mixed>
$rawCompanyData  : array<string|int, mixed>
check()  : bool
Check registration status.
getCompanyData()  : array<string|int, mixed>
Get parsed company registration data.
getCrmKey()  : string
Generate a unique key for the crm.
getError()  : string
Get last error.
getInstanceKey()  : string
Generate a unique key for the instance.
getProduct()  : array<string|int, mixed>
Get registration product.
getProducts()  : array<string|int, mixed>
Gets products.
getProvider()  : string
Get provider.
getStatus()  : int
Get registration status.
isPreRegistered()  : bool
Was registration attempted.
isRegistered()  : bool
Is the system is properly registered.
recreate()  : void
Recreate access.
register()  : bool
Send registration data.
send()  : void
Check statuses and send statistics.
sendStats()  : bool
Send statistics.
setRawCompanyData()  : self
Set company data.
shouldEnforceRegistration()  : bool
Should enforce registration.
getConf()  : array<string|int, mixed>
Get registration config.
getConfValue()  : mixed
Get configuration value by key.
getData()  : array<string|int, string>
Get registration data.
getStats()  : array<string|int, mixed>
Get the number of records by modules.
updateMetaData()  : bool
Update registration data.

Constants

REGISTRATION_FILE

public string REGISTRATION_FILE = ROOT_DIRECTORY . \DIRECTORY_SEPARATOR . 'app_data' . \DIRECTORY_SEPARATOR . 'registration.php'

Registration file path.

STATUS_MESSAGES

public array<string|int, string> STATUS_MESSAGES = [-2 => 'ERR_NO_INTERNET_CONNECTION', -1 => 'ERR_IT_HAS_NO_BEEN_6_HOURS_SINCE_THE_LAST_CHECK', 0 => 'LBL_NOT_REGISTERED', 1 => 'LBL_WAITING_FOR_ACCEPTANCE', 2 => 'LBL_INCORRECT_DATA', 3 => 'LBL_INCOMPLETE_DATA', 8 => 'LBL_SPECIAL_REGISTRATION', 9 => 'LBL_REGISTERED']

Status messages.

URL

public string URL = 'https://api.yetiforce.eu/registrations'

URL

Properties

$success

protected bool $success = false

Response result

$config

Registration config cache.

private static array<string|int, mixed> $config

$products

private static array<string|int, mixed> $products

Products

$rawCompanyData

private array<string|int, mixed> $rawCompanyData = []

Company data

Methods

check()

Check registration status.

public check() : bool
Return values
bool

getCompanyData()

Get parsed company registration data.

public getCompanyData() : array<string|int, mixed>
Return values
array<string|int, mixed>

getCrmKey()

Generate a unique key for the crm.

public static getCrmKey() : string
Return values
string

getError()

Get last error.

public getError() : string
Return values
string

getInstanceKey()

Generate a unique key for the instance.

public static getInstanceKey() : string
Return values
string

getProduct()

Get registration product.

public static getProduct(string $name) : array<string|int, mixed>
Parameters
$name : string
Return values
array<string|int, mixed>

getProducts()

Gets products.

public static getProducts() : array<string|int, mixed>
Return values
array<string|int, mixed>

getProvider()

Get provider.

public static getProvider() : string
Return values
string

getStatus()

Get registration status.

public getStatus([bool $force = false ]) : int
Parameters
$force : bool = false
Return values
int

isPreRegistered()

Was registration attempted.

public static isPreRegistered() : bool
Return values
bool

isRegistered()

Is the system is properly registered.

public static isRegistered() : bool
Return values
bool

recreate()

Recreate access.

public recreate() : void
Return values
void

register()

Send registration data.

public register() : bool
Return values
bool

send()

Check statuses and send statistics.

public send() : void
Return values
void

sendStats()

Send statistics.

public sendStats() : bool
Return values
bool

setRawCompanyData()

Set company data.

public setRawCompanyData(array<string|int, mixed> $data) : self
Parameters
$data : array<string|int, mixed>
Return values
self

shouldEnforceRegistration()

Should enforce registration.

public static shouldEnforceRegistration() : bool
Return values
bool

getConf()

Get registration config.

private static getConf() : array<string|int, mixed>
Return values
array<string|int, mixed>

getConfValue()

Get configuration value by key.

private static getConfValue(string $key) : mixed
Parameters
$key : string
Return values
mixed

getData()

Get registration data.

private getData() : array<string|int, string>
Return values
array<string|int, string>

getStats()

Get the number of records by modules.

private getStats() : array<string|int, mixed>
Return values
array<string|int, mixed>

updateMetaData()

Update registration data.

private updateMetaData(array<string|int, string> $data) : bool
Parameters
$data : array<string|int, string>
Return values
bool

        

Search results