pfatt/src/Config.php
2022-03-04 00:18:18 -06:00

66 lines
1.3 KiB
PHP

<?php
declare(strict_types=1);
namespace Pfatt;
/**
* Config wrapper.
*/
class Config
{
private string $pingHost = '8.8.8.8';
private string $ontInterface;
private string $rgInterface;
private string $rgEthernetMac;
public function __construct(string $ontInterface, string $rgInterface, string $rgEthernetMac, ?string $pingHost = null)
{
$this->ontInterface = $ontInterface;
$this->rgInterface = $rgInterface;
$this->rgEthernetMac = $rgEthernetMac;
if (isset($pingHost)) {
$this->pingHost = $pingHost;
}
}
/**
* Host to ping to check connection.
*
* @return string
*/
public function getPingHost(): string
{
return $this->pingHost;
}
/**
* Network interface connected to the ONT.
*
* @return string
*/
public function getOntInterface(): string
{
return $this->ontInterface;
}
/**
* Network interface connected to the Residential Gateway.
*
* @return string
*/
public function getRgInterface(): string
{
return $this->rgInterface;
}
/**
* Residential Gateway MAC address.
*
* @return string
*/
public function getRgEthernetMac(): string
{
return $this->rgEthernetMac;
}
}