original_string: public function set($key, $value)
      {
          if (!$this->db->isInitialized() || empty($key) || !isset($value)) {
              return false;
          }
  
          $this->reset($key);
  
          $serialized = 0;
  
          if (is_array($value)) {
              $value = serialize($value);
              $serialized = 1;
          }
  
          $values = array(
              'id' => $key,
              'value' => $value,
              'created' => GC_TIME,
              'serialized' => $serialized
          );
  
          $this->db->insert('settings', $values);
          return true;
      }
code: public function set($key, $value)
      {
          if (!$this->db->isInitialized() || empty($key) || !isset($value)) {
              return false;
          }
  
          $this->reset($key);
  
          $serialized = 0;
  
          if (is_array($value)) {
              $value = serialize($value);
              $serialized = 1;
          }
  
          $values = array(
              'id' => $key,
              'value' => $value,
              'created' => GC_TIME,
              'serialized' => $serialized
          );
  
          $this->db->insert('settings', $values);
          return true;
      }
code_tokens: public function set ( $ key , $ value ) { if ( ! $ this -> db -> isInitialized ( ) || empty ( $ key ) || ! isset ( $ value ) ) { return false ; } $ this -> reset ( $ key ) ; $ serialized = 0 ; if ( is_array ( $ value ) ) { $ value = serialize ( $ value ) ; $ serialized = 1 ; } $ values = array ( 'id' => $ key , 'value' => $ value , 'created' => GC_TIME , 'serialized' => $ serialized ) ; $ this -> db -> insert ( 'settings' , $ values ) ; return true ; }
docstring: Saves a configuration value in the database
  @param string $key
  @param mixed $value
  @return boolean
docstring_tokens: Saves a configuration value in the database