本文整理汇总了PHP中PEAR_REST::downloadHttp方法的典型用法代码示例。如果您正苦于以下问题:PHP PEAR_REST::downloadHttp方法的具体用法?PHP PEAR_REST::downloadHttp怎么用?PHP PEAR_REST::downloadHttp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PEAR_REST
的用法示例。
在下文中一共展示了PEAR_REST::downloadHttp方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
function _checkChannelForStatus($channel, $chan)
{
$rest = new PEAR_REST($this->config);
PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
$a = $rest->downloadHttp('http://' . $channel . '/channel.xml', $chan->lastModified());
PEAR::staticPopErrorHandling();
if (!PEAR::isError($a) && $a) {
$this->ui->outputData('WARNING: channel "' . $channel . '" has ' . 'updated its protocols, use "channel-update ' . $channel . '" to update');
}
}
示例2:
function _checkChannelForStatus($channel, $chan)
{
if (PEAR::isError($chan)) {
$this->raiseError($chan);
}
if (!is_a($chan, 'PEAR_ChannelFile')) {
return $this->raiseError('Internal corruption error: invalid channel "' . $channel . '"');
}
$rest = new PEAR_REST($this->config);
PEAR::staticPushErrorHandling(PEAR_ERROR_RETURN);
$a = $rest->downloadHttp('http://' . $channel . '/channel.xml', $chan->lastModified());
PEAR::staticPopErrorHandling();
if (!PEAR::isError($a) && $a) {
$this->ui->outputData('WARNING: channel "' . $channel . '" has ' . 'updated its protocols, use "channel-update ' . $channel . '" to update');
}
}
示例3: downloadHttp
/**
* @see PEAR_REST::downloadHttp()
*/
public function downloadHttp($url, $lastmodified = null, $accept = false)
{
return parent::downloadHttp($url, $lastmodified, array_merge(false !== $accept ? $accept : array(), array("\r\nX-SYMFONY-VERSION: " . SYMFONY_VERSION)));
}
示例4: downloadHttp
/**
* @see PEAR_REST::downloadHttp()
*/
public function downloadHttp($url, $lastmodified = null, $accept = false)
{
return parent::downloadHttp($url, $lastmodified, $accept);
}