MongoDB\BSON\Binary::toArray

Returns the vector as an array for a Binary with subtype MongoDB\BSON\Binary::SUBTYPE_VECTOR

Description

final public array MongoDB\BSON\Binary::toArray()

Parameters

This function has no parameters.

Return Values

Returns an array containing the vector data.

Errors/Exceptions

  • Throws MongoDB\Driver\Exception\LogicException if the subtype is not MongoDB\BSON\Binary::SUBTYPE_VECTOR.
  • Throws MongoDB\Driver\Exception\InvalidArgumentException on argument parsing errors.

See Also