\App\NetworkModule\EntitiesIPv4Connection

IPv4 connection entity

Summary

Methods
Properties
Constants
__construct()
fromForm()
fromNmCli()
getMethod()
getAddresses()
getGateway()
getDns()
toForm()
toNmCli()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$method
$addresses
$gateway
$dns
N/A

Properties

$method

$method : \App\NetworkModule\Enums\IPv4Methods

Type

normal — Connection method

$addresses

$addresses : \App\NetworkModule\Entities\IPv4Address[]

Type

normal — IPv4 addresses

$gateway

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

Type

normal — IPv4 gateway address

$dns

$dns : \Darsyn\IP\Version\IPv4[]

Type

normal — IPv4 addresses of DNS servers

Methods

__construct()

__construct(\App\NetworkModule\Enums\IPv4Methods  $method, \App\NetworkModule\Entities\IPv4Address[]  $addresses, \Darsyn\IP\Version\IPv4|null  $gateway, \Darsyn\IP\Version\IPv4[]  $dns) : mixed

IPv4 connection entity constructor

Parameters

\App\NetworkModule\Enums\IPv4Methods $method

Connection method

\App\NetworkModule\Entities\IPv4Address[] $addresses

IPv4 addresses

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

IPv4 gateway address

\Darsyn\IP\Version\IPv4[] $dns

DNS servers

Returns

mixed

fromForm()

fromForm(\stdClass|\Nette\Utils\ArrayHash  $form) : void

Sets the values from the network comnnection configuration form

Parameters

\stdClass|\Nette\Utils\ArrayHash $form

Values from the network connection configuration form

fromNmCli()

fromNmCli(string  $nmCli) : \App\NetworkModule\Entities\IPv4Connection

Creates a new IPv4 connection entity from nmcli connection configuration

Parameters

string $nmCli

nmcli connection configuration

Returns

\App\NetworkModule\Entities\IPv4Connection —

IPv4 connection entity

getMethod()

getMethod() : \App\NetworkModule\Enums\IPv4Methods

Returns the IPv4 connection method

Returns

\App\NetworkModule\Enums\IPv4Methods —

IPv4 connection method

getAddresses()

getAddresses() : \App\NetworkModule\Entities\IPv4Address[]

Returns the IPv4 addresses

Returns

\App\NetworkModule\Entities\IPv4Address[] —

IPv4 addresses

getGateway()

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

Returns the IPv4 gateway address

Returns

\Darsyn\IP\Version\IPv4|null —

IPv4 gateway address

getDns()

getDns() : \Darsyn\IP\Version\IPv4[]

Returns the IPv4 addresses of DNS servers

Returns

\Darsyn\IP\Version\IPv4[] —

IPv4 addresses of DNS servers

toForm()

toForm() : array<string,mixed>

Converts IPv4 connection entity to an array for the form

Returns

array

Array for the array

toNmCli()

toNmCli() : string

Converts IPv4 connection entity to nmcli configuration string

Returns

string —

nmcli configuration