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:----s+1JiG8mjjpoYOYxbSujBZs4OELJVbV71yohxHj2/RoHiHA/MwcUR8eZYHrgToWxImPcufrMyaN9Re4S6Ek/WBOGtAncprtZTEgW+8CDQL60ucmaB2T1OVtyEf5u2M2e6STkPGOCHZRx4MuOmIPBbexE2MzVtnFpcTbDpBRRanQSnoYr7xDfpYDOg1WkDQCBY+K4r7wmC+LSox/IkQrdQnWVfdHlWviDkMss6IxSJgeZbVc8BD9/qZRFFIBBvyLbt4e2bPpULP7lEATf5GNZgHaXgU8VauknAQT4AaP9osTAAaky00V+FKy1kPjMz297AfBb5FKdu/pBiXuUGq+UTEt0pPrz9rYXWKbLInN42oSpcD17nIkqkNVgleQeEnAoWihxTH80T5JD7/T2ndHNGiqnZ/tmuOjULsBlmoBj5hkkF40YXNvWsXhZJdhw4tk8N2mXUmeYUBSGnxMcxZkE0IYl7r8p89w39yl+Ol3Hb7Px5Wwm+ABDr0N2Gvh218p32M3eFAOiaS1XgVOfu/R1xZPMZiHYWdlwDOolS1CslVXlYNaH6Cq4ROHZLj7+pThRUAa3cTG6piiqWFtOpUbtKnFK26g5r2ssawlUuNzigjW0bQJxBQ+WtfoAzLtnCtofEIkZ029Zqig/xvuPkruCqTlaPBlLIGUYDXUKDXyr5YQ=----ATTACHMENT:----MzQ2NzQyNTE2Mjc4NjcwMiA2Nzk2Mjc0MjEyMzgxOTg4IDk2NzIxNjQyNzI1NTAwNDc=