/**
  * set all settings
  * @return mixed
  */
 private function getPlenigoSettings()
 {
     $sqlResult = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('company_i_d, company_private_key', 'tx_plenigofornews_domain_model_plenigosetting');
     if (class_exists('\\plenigo\\PlenigoManager')) {
         $this->plenigoInstance = \plenigo\PlenigoManager::configure($sqlResult['company_private_key'], $sqlResult['company_i_d']);
     }
     return $sqlResult;
 }
示例#2
0
 /**
  * if mathods are used static, then init has to be called first
  */
 public static function init()
 {
     if (!self::$initialized) {
         self::$secret = self::PIO()->ConfigGetSet('secret');
         self::$companyId = self::PIO()->ConfigGetSet('companyId');
         //configure plenigo:
         if (class_exists('\\plenigo\\PlenigoManager')) {
             \plenigo\PlenigoManager::configure(self::$secret, self::$companyId);
         }
     }
     self::$initialized = true;
 }
 private function connect()
 {
     try {
         \plenigo\PlenigoManager::configure($this->plenigoSettings->getCompanyPrivateKey(), $this->plenigoSettings->getCompanyID(), $this->plenigoSettings->isTestMode());
     } catch (\Exception $e) {
         $GLOBALS['TSFE']->pageUnavailableAndExit($e->getMessage(), 'HTTP/1.1 500 Internal Server Error');
         throw $e;
     }
 }