本文整理匯總了PHP中Http::isLocalURL方法的典型用法代碼示例。如果您正苦於以下問題:PHP Http::isLocalURL方法的具體用法?PHP Http::isLocalURL怎麽用?PHP Http::isLocalURL使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Http
的用法示例。
在下文中一共展示了Http::isLocalURL方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: proxySetup
/**
* Take care of setting up the proxy (do nothing if "noProxy" is set)
*
* @return void
*/
public function proxySetup() {
global $wgHTTPProxy;
// If there is an explicit proxy set and proxies are not disabled, then use it
if ( $this->proxy && !$this->noProxy ) {
return;
}
// Otherwise, fallback to $wgHTTPProxy/http_proxy (when set) if this is not a machine
// local URL and proxies are not disabled
if ( Http::isLocalURL( $this->url ) || $this->noProxy ) {
$this->proxy = '';
} elseif ( $wgHTTPProxy ) {
$this->proxy = $wgHTTPProxy;
} elseif ( getenv( "http_proxy" ) ) {
$this->proxy = getenv( "http_proxy" );
}
}
示例2: wfIsLocalURL
function wfIsLocalURL($url)
{
return Http::isLocalURL($url);
}
示例3: wfIsLocalURL
/**
* Alias for modularized function
* @deprecated Use Http::isLocalURL() instead
*/
function wfIsLocalURL($url)
{
wfDeprecated(__FUNCTION__);
return Http::isLocalURL($url);
}
示例4: proxySetup
/**
* Take care of setting up the proxy
* (override in subclass)
*
* @return String
*/
public function proxySetup()
{
global $wgHTTPProxy;
if ($this->proxy) {
return;
}
if (Http::isLocalURL($this->url)) {
$this->proxy = '';
} elseif ($wgHTTPProxy) {
$this->proxy = $wgHTTPProxy;
} elseif (getenv("http_proxy")) {
$this->proxy = getenv("http_proxy");
}
}