|
@ -4,13 +4,13 @@ |
|
|
* See LICENSE and AUTHORS files for details */ |
|
|
* See LICENSE and AUTHORS files for details */ |
|
|
|
|
|
|
|
|
declare(strict_types=1); |
|
|
declare(strict_types=1); |
|
|
|
|
|
|
|
|
namespace JKingWeb\Arsse\Misc; |
|
|
namespace JKingWeb\Arsse\Misc; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* A collection of functions for manipulating URLs |
|
|
* A collection of functions for manipulating URLs |
|
|
*/ |
|
|
*/ |
|
|
class URL { |
|
|
class URL { |
|
|
|
|
|
|
|
|
/** Returns whether a URL is absolute i.e. has a scheme */ |
|
|
/** Returns whether a URL is absolute i.e. has a scheme */ |
|
|
public static function absolute(string $url): bool { |
|
|
public static function absolute(string $url): bool { |
|
|
return (bool) strlen((string) parse_url($url, \PHP_URL_SCHEME)); |
|
|
return (bool) strlen((string) parse_url($url, \PHP_URL_SCHEME)); |
|
|