◆ __construct()
◆ asBinary()
get network (binary) form of address
- Returns
- string|false
◆ asBinaryString()
Convert an IP address to a binary character string (i.e. "01111111000000000000000000000001")
- Parameters
-
- Returns
- string
◆ asReadable()
return presentation form of address
- Returns
- string|false
◆ fromRequest()
Get IP address from the request server data
- Returns
- IPAddress
◆ ipVersion()
get the ip version, 4 or 6, of address
- Returns
- int|false integer 4 for IPV4, 6 for IPV6, or false if invalid
◆ normalize()
convert IP address into a normalized condensed notation
- Parameters
-
string | $ip | ip address to normalize |
- Returns
- 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.
- Parameters
-
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 |
- Returns
- bool true if $this->ip and $matchIp are both in the specified subnet
◆ $ip
The documentation for this class was generated from the following file:
- C:/xoops2511b2/htdocs/class/libraries/vendor/xoops/xmf/src/IPAddress.php