public function setPublicKey($public_key)
    {
        // If the public key is a file name then convert it to
        // the contents of the file (which should be an RSA public
        // key in PEM format)
        if (file_exists($public_key)) {
            $this->public_key_text = file_get_contents($public_key);
        } elseif (! empty($public_key)) {
            $this->public_key_text = $public_key;
        }

        return $this;
    }
public function setPublicKey($public_key)
    {
        // If the public key is a file name then convert it to
        // the contents of the file (which should be an RSA public
        // key in PEM format)
        if (file_exists($public_key)) {
            $this->public_key_text = file_get_contents($public_key);
        } elseif (! empty($public_key)) {
            $this->public_key_text = $public_key;
        }

        return $this;
    }
public function setPublicKey ( $ public_key ) { // If the public key is a file name then convert it to // the contents of the file (which should be an RSA public // key in PEM format) if ( file_exists ( $ public_key ) ) { $ this -> public_key_text = file_get_contents ( $ public_key ) ; } elseif ( ! empty ( $ public_key ) ) { $ this -> public_key_text = $ public_key ; } return $ this ; }
Set the public key text.

@param string $public_key

@return KeyPair provides a fluent interface.
Set the public key text .