pharext\Openssl\PrivateKey::exportPublicKey PHP Method

exportPublicKey() public method

Export the public key to a file
public exportPublicKey ( string $file )
$file string
    function exportPublicKey($file)
    {
        if (!file_put_contents("{$file}.tmp", $this->pub) || !rename("{$file}.tmp", $file)) {
            throw new Exception();
        }
    }