2020-05-02 07:58:59 +00:00
|
|
|
<?php
|
|
|
|
namespace App\Entity;
|
|
|
|
|
2020-07-10 08:18:10 +00:00
|
|
|
use Doctrine\Common\Collections\ArrayCollection;
|
2020-05-02 07:58:59 +00:00
|
|
|
|
2020-07-10 08:18:10 +00:00
|
|
|
class StationFrontendConfiguration extends ArrayCollection
|
2020-05-02 07:58:59 +00:00
|
|
|
{
|
|
|
|
public const CUSTOM_CONFIGURATION = 'custom_config';
|
|
|
|
|
|
|
|
public function getCustomConfiguration(): ?string
|
|
|
|
{
|
2020-07-10 08:18:10 +00:00
|
|
|
return $this->get(self::CUSTOM_CONFIGURATION);
|
2020-05-02 07:58:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function setCustomConfiguration(?string $config): void
|
|
|
|
{
|
2020-07-10 08:18:10 +00:00
|
|
|
$this->set(self::CUSTOM_CONFIGURATION, $config);
|
2020-05-02 07:58:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public const SOURCE_PASSWORD = 'source_pw';
|
|
|
|
|
|
|
|
public function getSourcePassword(): ?string
|
|
|
|
{
|
2020-07-10 08:18:10 +00:00
|
|
|
return $this->get(self::SOURCE_PASSWORD);
|
2020-05-02 07:58:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function setSourcePassword(?string $pw): void
|
|
|
|
{
|
2020-07-10 08:18:10 +00:00
|
|
|
$this->set(self::SOURCE_PASSWORD, $pw);
|
2020-05-02 07:58:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public const ADMIN_PASSWORD = 'admin_pw';
|
|
|
|
|
|
|
|
public function getAdminPassword(): ?string
|
|
|
|
{
|
2020-07-10 08:18:10 +00:00
|
|
|
return $this->get(self::ADMIN_PASSWORD);
|
2020-05-02 07:58:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function setAdminPassword(?string $pw): void
|
|
|
|
{
|
2020-07-10 08:18:10 +00:00
|
|
|
$this->set(self::ADMIN_PASSWORD, $pw);
|
2020-05-02 07:58:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public const RELAY_PASSWORD = 'relay_pw';
|
|
|
|
|
|
|
|
public function getRelayPassword(): ?string
|
|
|
|
{
|
2020-07-10 08:18:10 +00:00
|
|
|
return $this->get(self::RELAY_PASSWORD);
|
2020-05-02 07:58:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function setRelayPassword(?string $pw): void
|
|
|
|
{
|
2020-07-10 08:18:10 +00:00
|
|
|
$this->set(self::RELAY_PASSWORD, $pw);
|
2020-05-02 07:58:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public const STREAMER_PASSWORD = 'streamer_pw';
|
|
|
|
|
|
|
|
public function getStreamerPassword(): ?string
|
|
|
|
{
|
2020-07-10 08:18:10 +00:00
|
|
|
return $this->get(self::STREAMER_PASSWORD);
|
2020-05-02 07:58:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function setStreamerPassword(?string $pw): void
|
|
|
|
{
|
2020-07-10 08:18:10 +00:00
|
|
|
$this->set(self::STREAMER_PASSWORD, $pw);
|
2020-05-02 07:58:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public const PORT = 'port';
|
|
|
|
|
|
|
|
public function getPort(): ?int
|
|
|
|
{
|
2020-07-10 08:18:10 +00:00
|
|
|
$port = $this->get(self::PORT);
|
2020-05-02 08:32:41 +00:00
|
|
|
return is_numeric($port) ? (int)$port : null;
|
2020-05-02 07:58:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function setPort(?int $port): void
|
|
|
|
{
|
2020-07-10 08:18:10 +00:00
|
|
|
$this->set(self::PORT, $port);
|
2020-05-02 07:58:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public const MAX_LISTENERS = 'max_listeners';
|
|
|
|
|
|
|
|
public function getMaxListeners(): ?int
|
|
|
|
{
|
2020-07-10 08:18:10 +00:00
|
|
|
$listeners = $this->get(self::MAX_LISTENERS);
|
2020-05-02 08:32:41 +00:00
|
|
|
return is_numeric($listeners) ? (int)$listeners : null;
|
2020-05-02 07:58:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function setMaxListeners(?int $listeners): void
|
|
|
|
{
|
2020-07-10 08:18:10 +00:00
|
|
|
$this->set(self::MAX_LISTENERS, $listeners);
|
2020-05-02 07:58:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public const BANNED_IPS = 'banned_ips';
|
|
|
|
|
|
|
|
public function getBannedIps(): ?string
|
|
|
|
{
|
2020-07-10 08:18:10 +00:00
|
|
|
return $this->get(self::BANNED_IPS);
|
2020-05-02 07:58:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public function setBannedIps(?string $ips): void
|
|
|
|
{
|
2020-07-10 08:18:10 +00:00
|
|
|
$this->set(self::BANNED_IPS, $ips);
|
2020-05-02 07:58:59 +00:00
|
|
|
}
|
|
|
|
}
|