\App\NetworkModule\EntitiesIPv6Address

IPv6 address entity

Summary

Methods
Properties
Constants
__construct()
fromPrefix()
getAddress()
getPrefix()
getGateway()
toArray()
toString()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$address
$prefix
$gateway
N/A

Properties

$address

$address : \Darsyn\IP\Version\IPv6

Type

\Darsyn\IP\Version\IPv6 — IPv6 address

$prefix

$prefix : int

Type

normal — IPv6 prefix

$gateway

$gateway : \Darsyn\IP\Version\IPv6|null

Type

normal — IPv6 gateway address

Methods

__construct()

__construct(\Darsyn\IP\Version\IPv6  $address, int  $prefix, \Darsyn\IP\Version\IPv6|null  $gateway = null) : mixed

IPv6 address entity constructor

Parameters

\Darsyn\IP\Version\IPv6 $address

IPv6 address

int $prefix

IPv6 prefix

\Darsyn\IP\Version\IPv6|null $gateway

IPv6 gateway address

Returns

mixed

fromPrefix()

fromPrefix(string  $addr, string|null  $gwAddr = null) : \App\NetworkModule\Entities\IPv6Address

Creates a new IPv6 address entity from the IPv6 address and prefix as a string

Parameters

string $addr

IPv6 address with prefix as a string

string|null $gwAddr

IPv6 gateway address

Returns

\App\NetworkModule\Entities\IPv6Address —

IPv6 address entity

getAddress()

getAddress() : \Darsyn\IP\Version\IPv6

Returns the IPv6 address

Returns

\Darsyn\IP\Version\IPv6 —

IPv6 address

getPrefix()

getPrefix() : int

Returns the IPv6 prefix

Returns

int —

IPv6 prefix

getGateway()

getGateway() : \Darsyn\IP\Version\IPv6|null

Returns the IPv6 gateway prefix

Returns

\Darsyn\IP\Version\IPv6|null —

IPv6 gateway address

toArray()

toArray() : array<string,mixed>

Converts the IPv6 address entity to an array

Returns

array

IPv6 address entity in the array

toString()

toString() : string

Converts the IPv6 address entity to a string

Returns

string —

IPv6 address and prefix