Piwik\Plugins\Marketplace\LicenseKey::set PHP Method

set() public method

public set ( string | null | false $licenseKey )
$licenseKey string | null | false `null` or `false` will delete an existing a license key
    public function set($licenseKey)
    {
        if (!isset($licenseKey) || $licenseKey === false) {
            $this->delete();
        } else {
            Option::set('marketplace_license_key', (string) $licenseKey);
        }
    }

Usage Example

Example #1
0
File: API.php Project: piwik/piwik
 private function setLicenseKey($licenseKey)
 {
     $key = new LicenseKey();
     $key->set($licenseKey);
     $this->marketplaceClient->clearAllCacheEntries();
     $this->expired->clearCache();
 }
All Usage Examples Of Piwik\Plugins\Marketplace\LicenseKey::set