Horde_HashTable_Vfs::_get PHP Method

_get() protected method

protected _get ( $keys )
    protected function _get($keys)
    {
        $out = array();
        foreach ($keys as $key) {
            try {
                $out[$key] = $this->_vfs->read($this->_params['vfspath'], $key);
            } catch (Horde_Vfs_Exception $e) {
                $out[$key] = false;
            }
        }
        return $out;
    }

Usage Example

Example #1
0
 /**
  */
 protected function _get($keys)
 {
     if (!$this->_stream) {
         return parent::_get($keys);
     }
     $out = array();
     foreach ($keys as $key) {
         try {
             if (method_exists($this->_vfs, 'readStream')) {
                 $data = new Horde_Stream_Existing(array('stream' => $this->_vfs->readStream($this->_params['vfspath'], $key)));
                 $data->rewind();
             } else {
                 $data = new Horde_Stream_Temp();
                 $data->add($this->_vfs->read($this->_params['vfspath'], $key), true);
             }
         } catch (Horde_Vfs_Exception $e) {
             $data = false;
         }
         $out[$key] = $data;
     }
     return $out;
 }