-
Notifications
You must be signed in to change notification settings - Fork 5
Method: Soft Validate
Alejandro Mostajo edited this page Sep 5, 2019
·
1 revision
License string validation method. This method doesn't call any API endpoint, it validates the license based on a given string.
$isValid = Api::softValidate($getClosure);
Parameter | Type | Description |
---|---|---|
$getClosure |
Closure (callable on php5) |
A function that should return an instance of LicenseRequest . |
Type | Description |
---|---|
bool |
Flag indicating if the license key is valid or not. |
The following example will show how to validate an activated license key.
$isValid = Api::softValidate(
function() {
// ---------------------------------------------
// Code here...
// Code to load the LICENSE STRING saved on activation.
// Apply decryption if necessary.
// ---------------------------------------------
// MUST RETURN AN INSTANCE OF LicenseRequest
return new LicenseRequest($licenseString);
} // getClosure
);