Horde_HashTable_Vfs::_set PHP Method

_set() protected method

protected _set ( $key, $val, $opts )
    protected function _set($key, $val, $opts)
    {
        try {
            $this->_vfs->writeData($this->_params['vfspath'], $key, $val, true);
        } catch (Horde_Vfs_Exception $e) {
            return false;
        }
        return true;
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * @param array $opts  Additional option honored in this driver:
  *   - filename: (boolean) If true, $val is a filename containing the
  *               data to be saved rather than the data itself.
  */
 protected function _set($key, $val, $opts)
 {
     if (empty($opts['filename'])) {
         return parent::_set($key, $val, $opts);
     }
     try {
         $this->_vfs->write($this->_params['vfspath'], $key, $val, true);
     } catch (Horde_Vfs_Exception $e) {
         return false;
     }
     return true;
 }