mirror of
https://github.com/bitinflow/expose.git
synced 2026-03-14 14:05:54 +00:00
Allow users to specify custom hostnames
This commit is contained in:
35
app/Server/Connections/ConnectionConfiguration.php
Normal file
35
app/Server/Connections/ConnectionConfiguration.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Server\Connections;
|
||||
|
||||
class ConnectionConfiguration
|
||||
{
|
||||
protected $hostname;
|
||||
protected $subdomain;
|
||||
|
||||
private function __construct($subdomain, $hostname)
|
||||
{
|
||||
$this->subdomain = $subdomain;
|
||||
$this->hostname = $hostname;
|
||||
}
|
||||
|
||||
public static function withSubdomain($subdomain)
|
||||
{
|
||||
return new static($subdomain, null);
|
||||
}
|
||||
|
||||
public static function withHostname($hostname)
|
||||
{
|
||||
return new static(null, $hostname);
|
||||
}
|
||||
|
||||
public function getSubdomain()
|
||||
{
|
||||
return $this->subdomain;
|
||||
}
|
||||
|
||||
public function getHostname()
|
||||
{
|
||||
return $this->hostname;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user