Converter
in package
FinalYes
Table of Contents
Constants
- HOST_ADDRESS_BLOCK = "\xfe\x80"
- Significant 10 bits of IP to detect Zone ID regular expression pattern.
Methods
- build() : string
- compress() : string|null
- compressIp() : string
- expand() : string|null
- expandIp() : string
- isIpv6() : bool
- Tells whether the host is an IPv6.
- normalize() : string|null
- parse() : array{ipAddress: string|null, zoneIdentifier: string|null}
Constants
HOST_ADDRESS_BLOCK
Significant 10 bits of IP to detect Zone ID regular expression pattern.
private
string
HOST_ADDRESS_BLOCK
= "\xfe\x80"
Methods
build()
public
static build(array<string|int, mixed> $components) : string
Parameters
- $components : array<string|int, mixed>
Return values
stringcompress()
public
static compress(Stringable|string|null $host) : string|null
Parameters
- $host : Stringable|string|null
Return values
string|nullcompressIp()
public
static compressIp(string $ipAddress) : string
Parameters
- $ipAddress : string
Return values
stringexpand()
public
static expand(Stringable|string|null $host) : string|null
Parameters
- $host : Stringable|string|null
Return values
string|nullexpandIp()
public
static expandIp(string $ipAddress) : string
Parameters
- $ipAddress : string
Return values
stringisIpv6()
Tells whether the host is an IPv6.
public
static isIpv6(Stringable|string|null $host) : bool
Parameters
- $host : Stringable|string|null
Return values
boolnormalize()
public
static normalize(Stringable|string|null $host) : string|null
Parameters
- $host : Stringable|string|null
Return values
string|nullparse()
private
static parse(Stringable|string|null $host) : array{ipAddress: string|null, zoneIdentifier: string|null}
Parameters
- $host : Stringable|string|null