<?php
 namespace Eluceo\iCal\Domain\ValueObject; use InvalidArgumentException; final class Uri { private string $uri; public function __construct(string $uri) { if (!filter_var($uri, FILTER_VALIDATE_URL)) { throw new InvalidArgumentException("$uri is no valid URI"); } $this->uri = $uri; } public function getUri(): string { return $this->uri; } } 