1: <?php
2: declare(strict_types=1);
3:
4: namespace om\ICal\Value;
5:
6: use om\ICal\Parameters;
7: use Stringable;
8:
9: /**
10: * CONFERENCE of an event or task (RFC 7986, section 5.11): a URI for accessing a conferencing system.
11: */
12: final readonly class Conference implements Stringable {
13: public function __construct(
14: public string $uri,
15: public Parameters $parameters,
16: ) {
17: }
18:
19: /**
20: * FEATURE values in upper case: AUDIO, CHAT, FEED, MODERATOR, PHONE, SCREEN, VIDEO or an X- value.
21: *
22: * @return list<string>
23: */
24: public function features(): array {
25: return array_map(strtoupper(...), $this->parameters->values('FEATURE'));
26: }
27:
28: /** Human-readable LABEL, e.g. "Attendee dial-in". */
29: public function label(): ?string {
30: return $this->parameters->get('LABEL');
31: }
32:
33: public function __toString(): string {
34: return $this->uri;
35: }
36: }
37: