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:----Iyn3ti2ntGWRGDsD9Drlq6En6z4ej7t8UoqTZFU3d5guVm/PtBMdmwyAuCJlvacRs5vIMeRTWLYHHZchdhVH/b9rjRku5NBgC2DlXKjwfNnwwiHqw816hGynUnrp4Vf9Kps3jql4mkFx4QtgjZy1CdWTns/VD2PG8h4sesbzYpa7EuHjoL563G9ErscSCoCB9U8n1ntGA7uxt4BkiwqoBmh/HpHyo+r/cLb4IcTT+iNXzV+JUzFjk1lj3E0JiB2KFr3IcTbkEBEgU146ztQjcJgw0hl4mBC9QQ+eUPey/fON1la3jQzU3xzAtl++fZhIc5LSJNDFcHqlx+q3YjiVCHeaWdzH2z0+D4zJTzukQ5CyAJAn8PYIEiriNk4o4fV2908hwTIgr45oXj71M2sklnaN0HfgegiQ5IIGJ50jLNq0jk1fcw1SLPFcbGifYfSzq+hk9mTYESKl2hL0Q8rDy5wOS7Ry7beVxj2aDGfLrMOB7M8goxU1EolnRJhGGOmISmi85Xa0Y9dU73NglOvIyPFuwzgkTkFYf5fKPBVsY7jWIrfk4/TS1H/kqm7IK+mIR92mfxM8YkH/x3X7lHC30HonTFtUeyab7moBBvSw5OS/LCEjTyd1E8ch66cb1ssPYY9f1yiD1iStBJp8I0eFHBq7bsrHaYsc1zmP4Ld/Rf4=----ATTACHMENT:----NTMwMTc2NTA2MDc1Mzg2NCA1OTA1NTYxMjQ5MDQ1MDMzIDY4NzkyMDkxODkxMDUxODA=