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:----PBzQgSboX1ERUZKHJ9Hai+hl2qOc1l48TAa2Xj6bU2q7TSux7bdPAX+7HN1zDZE+Yu3lN1CRvCWriTsWCchrBKl8cm+lpJ9o0fUa4vGuNsFKGE7oMMYdUiFQGeHPk0F6QAtW9tCP5g6cBIz0CDYHUKMe7qMf74J+t8wA52Ja1kCZYTSc7b7RS3LwgYxbTdd8afjU1QXpjn7hpvUX18+Dc68pf1nPf/Ep+WzAyFlq487pLwKnLPfzmeRlCIBykK5nllQWmAXy6lCEjzegMm+5eHvVOXJhAabdfineqQ3tlTxXrh2Fk22OByUls3RQlbSEzevvj+reWCNw3gUMtN7HiS+K4Y6DKOKPzbc2nn8XAn3qGNTDbdw6+uPChSKlegnz9LRmB7tgcLmaMPks9kPYdDo0dRA4ibyG0SPYcXLvggwwcteLDyeQceOUTcg5aC1AWSEtYuya9+vBJWLsqOESKmnYY3Cuyb+j8TdY5r2aS8e5BEhJd+bhaA9aviWhdnNgD8vTDneFQXjmYFakI4WCXuM0n/KTWBW3XAHkrWGE2DsqBYF7VAGqeDnCBQJ7JUL8iO1DWaqcdLa7EJY/axGs9bpbyXCs4QjF6Qrg0sd8tLbxTe+t/+dQIh0xqqE0pCKcOaqJq7ePmS8+YqDOuGHOX4CpBMTjgNGr+HD+BLRuVO0=----ATTACHMENT:----NDkwNTg0OTMxNjkzMDE1MSAyMDQ5MjQ1NzA2NjAzODk1IDQ5NTM0NDI0MjgwMjE1NDc=