2 declare(strict_types = 1);
19 use Psr\Http\Message\UriInterface;
49 foreach ($configuration[
'domains'] ?? [] as $domain) {
50 if (empty($domain[
'domainName'] ??
false)) {
53 $this->domainRecords[] = $domain;
56 if (empty($this->entryPoints)) {
57 $this->entryPoints = [
new Uri(
'/')];
59 $baseEntryPoint = reset($this->entryPoints);
61 parent::__construct($configuration[
'languages'], $baseEntryPoint);
77 public function getBase(): UriInterface
79 return $this->entryPoints[0] ??
new Uri(
'/');
113 if (!empty($base) && strpos($base,
'//') ===
false && $base[0] !==
'/') {
117 if (strpos($base,
'.') ===
false) {
121 $base =
'//' . $base;