IPv4Address
extends Type
in package
Represents an IPv4 address
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- Constructor
- __toString() : string
- Magic method for type coercion to string
- getOctets() : array<string|int, int>
- Get the address octets
- getValue() : mixed
- Get the internal value
- setOctets() : mixed
- Set the address octets
- setValue() : mixed
- Set the internal value
Properties
$value
protected
string
$value
= '0.0.0.0'
$octets
private
array<string|int, int>
$octets
= [0, 0, 0, 0]
The octets of the address
Methods
__construct()
Constructor
public
__construct([string|array<string|int, int> $value = null ]) : mixed
Parameters
- $value : string|array<string|int, int> = null
-
String representation or octet list
Tags
__toString()
Magic method for type coercion to string
public
__toString() : string
Return values
stringgetOctets()
Get the address octets
public
getOctets() : array<string|int, int>
Return values
array<string|int, int>getValue()
Get the internal value
public
getValue() : mixed
setOctets()
Set the address octets
public
setOctets(array<string|int, int> $octets) : mixed
Parameters
- $octets : array<string|int, int>
-
The new address octets
Tags
setValue()
Set the internal value
public
setValue(string $value) : mixed
Parameters
- $value : string
-
The new value