◆ __construct()
◆ asBinary()
get network (binary) form of address
- Renvoie
- string|false
◆ asBinaryString()
Convert an IP address to a binary character string (i.e. "01111111000000000000000000000001")
- Paramètres
-
- Renvoie
- string
◆ asReadable()
return presentation form of address
- Renvoie
- string|false
◆ fromRequest()
Get IP address from the request server data
- Renvoie
- IPAddress
◆ ipVersion()
get the ip version, 4 or 6, of address
- Renvoie
- int|false integer 4 for IPV4, 6 for IPV6, or false if invalid
◆ normalize()
convert IP address into a normalized condensed notation
- Paramètres
-
string | $ip | ip address to normalize |
- Renvoie
- string|false normalized address or false on failure
◆ sameSubnet()
sameSubnet |
( |
|
$matchIp, |
|
|
|
$netMask4, |
|
|
|
$netMask6 |
|
) |
| |
Is this IP in the same subnet as the supplied address?
Accepts net masks for both IPV4 and IPV6 and will select the appropriate one, to allow checking policy against request input with minimal method calls.
- Paramètres
-
string | $matchIp | presentation form ip address to compare |
int | $netMask4 | network mask, bits to match <= 32 for IPV4 |
int | $netMask6 | network mask, bits to match <=128 for IPV6 |
- Renvoie
- bool true if $this->ip and $matchIp are both in the specified subnet
◆ $ip
La documentation de cette classe a été générée à partir du fichier suivant :
- XoopsCore25-2.5.11-Beta1/htdocs/class/libraries/vendor/xoops/xmf/src/IPAddress.php