\App\NetworkModule\EntitiesIPv4Address

IPv4 address entity

Summary

Methods
Properties
Constants
__construct()
fromMask()
fromPrefix()
getAddress()
getPrefix()
getMask()
toArray()
toString()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

__construct()

__construct(\App\NetworkModule\Entities\IPv4  address,   prefix) : 

IPv4 address entity constructor

Parameters

\App\NetworkModule\Entities\IPv4 address

IPv4 address

prefix

IPv4 address prefix

Returns

fromMask()

fromMask(  address,   mask) : \App\NetworkModule\Entities\IPv4Address

Creates a new IPv4 address entity from the address and the subnet mask

Parameters

address

IPv4 address

mask

IPv4 subnet mask

Returns

\App\NetworkModule\Entities\IPv4Address —

IPv4 address entity

fromPrefix()

fromPrefix(  string) : \App\NetworkModule\Entities\IPv4Address

Creates a new IPv4 address entity from the address with prefix

Parameters

string

IPv4 address with prefix

Returns

\App\NetworkModule\Entities\IPv4Address —

IPv4 address entity

getAddress()

getAddress() : \App\NetworkModule\Entities\IPv4

Returns the IPv4 address

Returns

\App\NetworkModule\Entities\IPv4 —

IPv4 address

getPrefix()

getPrefix() : 

Returns the IPv4 address prefix

Returns

IPv4 address prefix

getMask()

getMask() : \App\NetworkModule\Entities\IPv4

Returns the IPv4 address mask

Returns

\App\NetworkModule\Entities\IPv4 —

IPv4 address mask

toArray()

toArray() : mixed|string|string|int

Converts the IPv4 address entity to an array

Returns

mixed|string|string|int —

IPv4 address entity in the array

toString()

toString() : 

COnverts the IPv4 address entity to a string

Returns

IPv4 address with prefix