取得数据
mixed Module_Storage_Driver_Swift::get( string/array $key )
参数列表
参数 类型 描述 默认值 $key
string/array
$key
mixed
public function get($key)
{
if (is_array($key))
{
$rs = array();
foreach ($key as $k)
{
$rs[$k] = $this->get($k);
}
return $rs;
}
$rs = $this->get_response($key, 'GET');
if ($rs['code']>=200 && $rs['code']<300)
{
$this->_de_format_data($rs['body']);
return $rs['body'];
}
if ($rs['code']==404)return null;
throw new Exception(__('Swift get error, code: :code.', array(':code'=>$rs['code'])));
}