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;
    }
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;
    }
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 ; }
Saves a configuration value in the database
@param string $key
@param mixed $value
@return boolean
Saves a configuration value in the database