\App\NetworkModule\EntitiesConnectionDetail

Detailed network connection entity

Summary

Methods
Properties
Constants
__construct()
fromForm()
fromNmCli()
getId()
getUuid()
getType()
getInterfaceName()
getIpv4()
getIpv6()
toForm()
toNmCli()
jsonSerialize()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$id
$uuid
$type
$interfaceName
$ipv4
$ipv6
N/A

Properties

$id

$id : string

Type

normal — Network connection ID

$uuid

$uuid : \Ramsey\Uuid\UuidInterface

Type

\Ramsey\Uuid\UuidInterface — Network connection UUID

$type

$type : \App\NetworkModule\Enums\ConnectionTypes

Type

normal — Network connection type

$interfaceName

$interfaceName : string

Type

normal — Network interface name

$ipv4

$ipv4 : \App\NetworkModule\Entities\IPv4Connection

Type

normal — IPv4 network connection entity

$ipv6

$ipv6 : \App\NetworkModule\Entities\IPv6Connection

Type

normal — IPv6 network connection entity

Methods

__construct()

__construct(string  $id, \Ramsey\Uuid\UuidInterface  $uuid, \App\NetworkModule\Enums\ConnectionTypes  $type, string  $name, \App\NetworkModule\Entities\IPv4Connection  $ipv4, \App\NetworkModule\Entities\IPv6Connection  $ipv6) : mixed

Network connection entity constructor

Parameters

string $id

Network connection ID

\Ramsey\Uuid\UuidInterface $uuid

Network connection UUID

\App\NetworkModule\Enums\ConnectionTypes $type

Network connection type

string $name

Network connection name

\App\NetworkModule\Entities\IPv4Connection $ipv4

IPv4 network connection entity

\App\NetworkModule\Entities\IPv6Connection $ipv6

IPv6 network connection entity

Returns

mixed

fromForm()

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

Sets the values from the network connection configuration form

Parameters

\stdClass|\Nette\Utils\ArrayHash $form

Network connection configuration form values

fromNmCli()

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

Creates a new detailed network connection entity from nmcli connection configuration

Parameters

string $nmCli

nmcli connection configuration

Returns

\App\NetworkModule\Entities\ConnectionDetail —

Detailed network connection entity

getId()

getId() : string

Returns the network connection ID

Returns

string —

Network connection ID

getUuid()

getUuid() : \Ramsey\Uuid\UuidInterface

Returns the network connection UUID

Returns

\Ramsey\Uuid\UuidInterface —

Network connection UUID

getType()

getType() : \App\NetworkModule\Enums\ConnectionTypes

Returns the network connection type

Returns

\App\NetworkModule\Enums\ConnectionTypes —

Network connection type

getInterfaceName()

getInterfaceName() : string

Returns the network connection name

Returns

string —

Network connection name

getIpv4()

getIpv4() : \App\NetworkModule\Entities\IPv4Connection

Returns the IPv4 network connection entity

Returns

\App\NetworkModule\Entities\IPv4Connection —

IPv4 network connection entity

getIpv6()

getIpv6() : \App\NetworkModule\Entities\IPv6Connection

Returns the IPv6 network connection entity

Returns

\App\NetworkModule\Entities\IPv6Connection —

IPv4 network connection entity

toForm()

toForm() : array<string,string|array>

Converts network connection entity to an array for the form

Returns

array

Array for the form

toNmCli()

toNmCli() : string

Converts the network connection entity to nmcli configuration string

Returns

string —

nmcli configuration

jsonSerialize()

jsonSerialize() : array<string,string|array>

Returns JSON serialized data

Returns

array

JSON serialized data