public function encode($input)
    {
        $parts = explode('.', $input);

        foreach ($parts as &$part) {
            $part = $this->_encodePart($part);
        }

        return implode('.', $parts);
    }
public function encode($input)
    {
        $parts = explode('.', $input);

        foreach ($parts as &$part) {
            $part = $this->_encodePart($part);
        }

        return implode('.', $parts);
    }
public function encode ( $ input ) { $ parts = explode ( '.' , $ input ) ; foreach ( $ parts as & $ part ) { $ part = $ this -> _encodePart ( $ part ) ; } return implode ( '.' , $ parts ) ; }
Encode a domain to its Punycode version.

@param string $input  Domain name in Unicde to be encoded.

@return string  Punycode representation in ASCII.
Encode a domain to its Punycode version .