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

        return $this;
    }