/** * Returns an instance of class (singleton pattern implementation). * * @return SKADATE_BOL_Service */ public static function getInstance() { if (self::$classInstance === null) { self::$classInstance = new self(); } return self::$classInstance; }
public function invalidKey() { if (isset($_GET['check'])) { if (!empty($_GET['key'])) { OW::getConfig()->saveConfig('skadate', 'license_key', trim($_GET['key'])); } SKADATE_BOL_LicenceService::getInstance()->validateKey(); if (!(bool) OW::getConfig()->getValue('skadate', 'license_key_valid')) { OW::getFeedback()->error(OW::getLanguage()->text('skadate', 'validation_failed')); } $this->redirect(OW::getRequest()->buildUrlQueryString(null, array('check' => null))); } if (strlen(trim(OW::getConfig()->getValue('skadate', 'license_key'))) < 1) { $this->assign('input', 1); } $this->assign('url', OW::getRequest()->buildUrlQueryString(null, array('check' => 1))); }
public function validateKey() { SKADATE_BOL_LicenceService::getInstance()->validateKey(); }