/** * @see PEAR_REST::downloadHttp() */ public function downloadHttp($url, $lastmodified = null, $accept = false) { try { $file = sfPluginTestHelper::convertUrlToFixture($url); } catch (sfException $e) { return PEAR::raiseError($e->getMessage()); } $headers = array('content-type' => preg_match('/\\.xml$/', $file) ? 'text/xml' : 'text/plain'); return array(file_get_contents($file), 0, $headers); }
/** * @see PEAR_REST::downloadHttp() */ public function downloadHttp($url, &$ui, $save_dir = '.', $callback = null, $lastmodified = null, $accept = false, $channel = false) { try { $file = sfPluginTestHelper::convertUrlToFixture($url); } catch (sfException $e) { return PEAR::raiseError($e->getMessage()); } if ($lastmodified === false || $lastmodified) { return array($file, 0, array()); } return $file; }