解析返回完善的请求的URL
null Module_OOP_ORM_Finder_REST::parse_api_fullurl( [ string $query = null ] )
参数列表
参数 类型 描述 默认值 $query
string
$query null
protected function parse_api_fullurl($query = null)
{
$url = $this->api_url;
if ($query)
{
if (is_array($query))
{
$query = http_build_query($query, '', '&');
}
$url .= (strpos($this->api_url, '?') === false ? '?' : '&') . $query;
}
else if ($this->method!='POST' && $this->method!='PUT')
{
$url .= (strpos($this->api_url, '?') === false ? '?' : '&') . http_build_query($this->arguments, '', '&');
}
return $url;
}