src/WhoisClient.php
public function setWhoisInfo($result)
    {
        $info = array(
            'server' => $this->query['server'],
        );

        if (!empty($this->query['args'])) {
            $info['args'] = $this->query['args'];
        } else {
            $info['args'] = $this->query['query'];
        }

        if (!empty($this->query['server_port'])) {
            $info['port'] = $this->query['server_port'];
        } else {
            $info['port'] = 43;
        }

        if (isset($result['regyinfo']['whois'])) {
            unset($result['regyinfo']['whois']);
        }

        if (isset($result['regyinfo']['rwhois'])) {
            unset($result['regyinfo']['rwhois']);
        }

        $result['regyinfo']['servers'][] = $info;

        return $result;
    }
public function setWhoisInfo($result)
    {
        $info = array(
            'server' => $this->query['server'],
        );

        if (!empty($this->query['args'])) {
            $info['args'] = $this->query['args'];
        } else {
            $info['args'] = $this->query['query'];
        }

        if (!empty($this->query['server_port'])) {
            $info['port'] = $this->query['server_port'];
        } else {
            $info['port'] = 43;
        }

        if (isset($result['regyinfo']['whois'])) {
            unset($result['regyinfo']['whois']);
        }

        if (isset($result['regyinfo']['rwhois'])) {
            unset($result['regyinfo']['rwhois']);
        }

        $result['regyinfo']['servers'][] = $info;

        return $result;
    }
public function setWhoisInfo ( $ result ) { $ info = array ( 'server' => $ this -> query [ 'server' ] , ) ; if ( ! empty ( $ this -> query [ 'args' ] ) ) { $ info [ 'args' ] = $ this -> query [ 'args' ] ; } else { $ info [ 'args' ] = $ this -> query [ 'query' ] ; } if ( ! empty ( $ this -> query [ 'server_port' ] ) ) { $ info [ 'port' ] = $ this -> query [ 'server_port' ] ; } else { $ info [ 'port' ] = 43 ; } if ( isset ( $ result [ 'regyinfo' ] [ 'whois' ] ) ) { unset ( $ result [ 'regyinfo' ] [ 'whois' ] ) ; } if ( isset ( $ result [ 'regyinfo' ] [ 'rwhois' ] ) ) { unset ( $ result [ 'regyinfo' ] [ 'rwhois' ] ) ; } $ result [ 'regyinfo' ] [ 'servers' ] [ ] = $ info ; return $ result ; }
Adds whois server query information to result

@param $result array Result array
@return array Original result array with server query information
Adds whois server query information to result