*/
function cleanup_url($url)
{
- $obj_url = new Url($url);
- return $obj_url->cleanup();
+ $obj_url = new Url($url);
+ return $obj_url->cleanup();
}
/**
*/
function get_url_scheme($url)
{
- $obj_url = new Url($url);
- return $obj_url->getScheme();
+ $obj_url = new Url($url);
+ return $obj_url->getScheme();
}
/**
}
$this->parts['query'] = implode('&', $queryParams);
- }
+ }
/**
* Removes undesired fragments
*
* @return string the URL scheme or false if none is provided.
*/
- public function getScheme() {
+ public function getScheme()
+ {
if (!isset($this->parts['scheme'])) {
return false;
}
*
* @return string the URL host or false if none is provided.
*/
- public function getHost() {
+ public function getHost()
+ {
if (empty($this->parts['host'])) {
return false;
}
*
* @return true is HTTP, false otherwise.
*/
- public function isHttp() {
+ public function isHttp()
+ {
return strpos(strtolower($this->parts['scheme']), 'http') !== false;
}
}