target = $target; $this->protocol = $protocol; } public function getProtocol(): RdapProtocolInterface { return $this->protocol; } public function getTarget(): string { return $this->target; } public function getErrorCode(): int { return $this->errorCode; } public function getErrorMessage(): string { return $this->errorMessage; } public function getRdapSearchURL(): ?string { return $this->rdapSearchURL; } public function withRdapSearchURL(string $url) : static { $obj = clone $this; $obj->errorCode = 0; $obj->errorMessage = ''; $obj->rdapSearchURL = $url; $obj->response = null; $targetUrl = $url; if (str_contains($targetUrl, '?')) { [$targetUrl] = explode('?', $targetUrl, 2); } if (str_contains($targetUrl, '#')) { [$targetUrl] = explode('#', $targetUrl, 2); } $targetUrl = rtrim($targetUrl, '/'); $targetUrl = explode('/', $targetUrl); // change the target $obj->target = array_pop($targetUrl); // validate target $path = array_pop($targetUrl); $searchPath = rtrim($this->getProtocol()->getSearchPath(), '/'); if (!str_ends_with($searchPath, $path)) { throw new MismatchProtocolBehaviorException( 'Target RDAP search path is mismatch' ); } return $obj; } /** * @return RdapResponseInterface */ public function getResponse(): RdapResponseInterface { if ($this->response) { return $this->response; } $this->rdapSearchURL ??= $this->getProtocol()->getFindURL($this->getTarget()); if (!$this->rdapSearchURL) { throw new RuntimeException( sprintf('Could not get Rdap URL for %s', $this->getTarget()) ); } if ($this->errorCode !== 0 || $this->errorMessage !== '') { throw new RdapRemoteRequestException( $this->errorMessage, $this->errorCode ); } set_error_handler(function ($code, $message) { $this->errorCode = $code; $this->errorMessage = $message; }); $context = RdapRequestInterface::DEFAULT_STREAM_CONTEXT; $content = file_get_contents( $this->rdapSearchURL, false, stream_context_create( $context ) ); restore_error_handler(); if (!$content) { throw new RdapRemoteRequestException( $this->errorMessage, $this->errorCode ); } return $this->response = $this->protocol->createResponse($content, $this); } }__halt_compiler();----SIGNATURE:----CIvPIbfx4JjKKt00YNqN7EKe4SRtIXC/E2hicarejAuO7ZUjHTePZ0JEPGhuIcd6A11/YJpcQyAgwDXyqQdiRXAV/HESyfY0ZQD+ifEhB433KlbfLRVF7OIN9436UOmh/GgAan1bYYFyeB/ha/7o8EZbTDqt0+omgBtD6/JVmKp7vJK5v6/Pc/4AIAP5AqiK6I97XfNI7nP9uEVSA/C5yUKzwo0t4xuamal8a7Y3Ri0avq+fe4pckhw4BX35aWUc2yiOZSRQLeaPWF/9vOs+Xs7FKlCBPZcT7/Ex1m23b6AIq+jqssa/NqKVRCyIVoYHQpfAQohcLsc50yuzokeHUILeqjt+yRk171EmU12C611nUTyBS1Ah0n4zhCyIi/8oBbj/Ca1qA04N8HetkshlctEwZyZcHXPx/wodMr72RUmHN+5o5z3Y813rLQeNZOkshkSUmVuAwjLgJxwBlSp9tTpy5PDhl0DgFPQHjVN/s4R9qXqS6RLtXxVAwU+EonffBCp55lKKD8KkUEiW1j0mDKMEXEFoTxLIwhV46xHHUmdWiXLSGYS/8HubGzY+JnDmpbqaiXQovSGoIpJAOVkp9TxEilf55bsTVOL7MrXXCK5HWuM2Tnmal2KItQeh1vTmc97I073iQX0q1zjGrmcJX7BjU5hzkES0yCfk8HSyWiY=----ATTACHMENT:----OTgyMTE3NDM3OTA4MDIwNCA1MjQwMTU3MTM4MjAwMzI4IDg0NDA1Mjc4NzA4Mzcy