protected httpBuildQuery ( $url, array $options ) : string | ||
$url | ||
$options | array | |
return | string |
protected function httpBuildQuery($url, array $options)
{
if (!empty($options)) {
$url .= (stripos($url, '?') === null ? '&' : '?') . http_build_query($options);
}
return $url;
}
/** * 增加微信基本链接 * @inheritdoc */ protected function httpBuildQuery($url, array $options) { if (stripos($url, 'http://') === false && stripos($url, 'https://') === false) { $url = self::WECHAT_BASE_URL . $url; } return parent::httpBuildQuery($url, $options); }