/**
  *   Konstruktor
  */
 function __construct($dataArr, $finalArr)
 {
     parent::__construct($dataArr, $finalArr);
     require_once JPATH_COMPONENT . DS . 'models' . DS . 'config.php';
     $configModel = new ConfigModel();
     define('IGNORE_MERGE', $configModel->loadConfigValue('constant', 'OPTIMIZED_IGNORE_MERGE'));
     define('BOTTOM_MERGE_STEP', $configModel->loadConfigValue('constant', 'OPTIMIZED_BOTTOM_MERGE_STEP'));
     define('MAX_ARR_VALUES', $configModel->loadConfigValue('constant', 'OPTIMIZED_MAX_ARR_VALUES'));
 }
Beispiel #2
0
 /**
  *  Výchozí inicializace - načtení potřebných tříd...
  */
 function __construct($updateMode = true)
 {
     require_once JPATH_COMPONENT . DS . 'models' . DS . 'expirience.php';
     $this->model = new ExpirienceModel();
     if ($updateMode) {
         require_once JPATH_COMPONENT . DS . 'models' . DS . 'config.php';
         $configModel = new ConfigModel();
         $this->autoPlusRatio = $configModel->loadConfigValue('constant', 'EXPIRIENCE_AUTO_RATIO');
         $this->userPlusRatio = $configModel->loadConfigValue('constant', 'EXPIRIENCE_USER_RATIO');
     }
 }
 public function initMapping()
 {
     require_once JPATH_COMPONENT . DS . 'models' . DS . 'config.php';
     $configModel = new ConfigModel();
     $this->ngramsLength = $configModel->loadConfigValue('constant', 'VALUES_MAPPING_NGRAMS_LENGTH');
     $this->finalArr = $this->mapValues($this->finalArr);
 }
Beispiel #4
0
 /**
  *  Výchozí inicializace - načtení potřebných tříd...
  */
 function __construct()
 {
     require_once JPATH_COMPONENT . DS . 'library' . DS . 'StringClass.php';
     require_once JPATH_COMPONENT . DS . 'library' . DS . 'NumericClass.php';
     require_once JPATH_COMPONENT . DS . 'library' . DS . 'ExpirienceClass.php';
     require_once JPATH_COMPONENT . DS . 'models' . DS . 'config.php';
     $configModel = new ConfigModel();
     $constants = $configModel->loadConfigs('matchRate');
     if (count($constants) > 0) {
         foreach ($constants as $constant) {
             define($constant->name, $constant->value);
         }
     }
     $this->expClass = new ExpirienceClass(false);
     $this->xgramLength = $configModel->loadConfigValue('constant', 'COLUMN_XGRAM_LENGTH');
     $this->minusInf = $configModel->loadConfigValue('constant', 'MINUS_INFINITE');
     $this->plusInf = $configModel->loadConfigValue('constant', 'PLUS_INFINITE');
 }