Пример #1
0
 /**
  *
  * @param array|string|null $filter
  * @return array
  */
 public static function getSettingsByFilter($filter = null)
 {
     if (null == self::$_model) {
         self::$_model = new Ht_Model_DbTable_SystemSetting();
     }
     return self::$_model->getSettingsByFilter($filter);
 }
Пример #2
0
 public static function update($key, $value)
 {
     $table = new Ht_Model_DbTable_SystemSetting();
     $record = $table->fetchRow("setting_name='{$key}'");
     if (!$record) {
         $record = $table->fetchNew();
     }
     $record->setFromArray(array("setting_name" => $key, "setting_value" => $value));
     return $record->save();
 }