/** * * @param string $url * @return string */ public static function absoluteURL($url, $host = null) { if (!preg_match("~^(?:f|ht)tps?://~i", $url)) { $url = ($host ? Renamer::absoluteURL($host) : "http://") . $url; } return $url; }