示例#1
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');
 }