ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
FileDeliverySetupConfig.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
25
36final readonly class FileDeliverySetupConfig implements Config
37{
40
46 public function __construct(
47 bool $isolation_activated = false,
48 ?string $isolation_content_domain = null,
49 private bool $isolation_configured = true,
50 ) {
51 // normalize to a bare origin using the same rules the runtime enforces
53
54 // The ILIAS domain is no longer configured here: it is derived from the
55 // installed http_path at build time (see IsolationObjective). Only the
56 // content domain is admin-provided and therefore validated here.
57 if ($isolation_activated && $content === null) {
58 throw new \InvalidArgumentException(
59 'IRSS User Content Isolation requires a valid content domain '
60 . '(a bare host like "content.example.org" or a "scheme://host[:port]" '
61 . 'origin, no userinfo/path/query). Given: '
62 . var_export($isolation_content_domain, true)
63 );
64 }
65
66 $this->isolation_activated = $isolation_activated;
67 $this->isolation_content_domain = $content;
68 }
69
70 public function isIsolationActivated(): bool
71 {
73 }
74
75 public function getIsolationContentDomain(): ?string
76 {
78 }
79
80 public function isIsolationConfigured(): bool
81 {
82 return $this->isolation_configured;
83 }
84}
Read-only configuration of the IRSS User Content Isolation feature.
static normalizeOrigin(mixed $value)
Validate and normalize a configured domain to a bare origin ("scheme://host[:port]"),...
Setup configuration for the FileDelivery component.
__construct(bool $isolation_activated=false, ?string $isolation_content_domain=null, private bool $isolation_configured=true,)
A configuration for the setup.
Definition: Config.php:27