php8.5
Home/ Manual/ driver / clientencryption/ MongoDB\Driver\ClientEncryption::getKeyByAltName

MongoDB\Driver\ClientEncryption::getKeyByAltName

PHP function Edit on GitHub ✎

(mongodb >=1.15.0)

Gets a key document by an alternate name

Description

MongoDB\Driver\ClientEncryption::getKeyByAltName(string $keyAltName): object|null

Finds a single key document in the key vault collection with the given alternate name keyAltName.

Parameters

keyAltName

Alternate name for the key document.

Return Values

Returns the key document, or null if no document matched.

Errors/Exceptions

  • Throws MongoDB\Driver\Exception\RuntimeException on other errors.

See Also

Source: reference/mongodb/mongodb/driver/clientencryption/getkeybyaltname.xml · from the official PHP manual (php/doc-en)