validateUrl($source) || !$this->validateUrl($target)) { throw new InvalidUrlException(); } // Validate that the webmention target is a domain I care about if (!str_contains($target, "https://lewisdale.dev")) { throw new InvalidTargetException(); } // Parse content from the source $client = HttpClient::create(); $response = $client->request('GET', $source); if ($response->getStatusCode() === 200) { $content = $this->parseContent($response->getContent()); $author = $this->parseAuthor($response->getContent()); $webmention = new Webmention(null, $target, $source, $content, $author); $this->gateway->save($webmention); } } private function parseContent(string $content) : ?string { return null; } private function parseAuthor(string $author) : ?string { return null; } }