array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'mongodb-bson-binary.fromvector.php', 1 => 'MongoDB\\BSON\\Binary::fromVector', 2 => 'Creates a new binary with subtype MongoDB\\BSON\\Binary::SUBTYPE_VECTOR from the given array and vector type', ), 'up' => array ( 0 => 'class.mongodb-bson-binary.php', 1 => 'MongoDB\\BSON\\Binary', ), 'prev' => array ( 0 => 'mongodb-bson-binary.construct.php', 1 => 'MongoDB\\BSON\\Binary::__construct', ), 'next' => array ( 0 => 'mongodb-bson-binary.getdata.php', 1 => 'MongoDB\\BSON\\Binary::getData', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'en', 'path' => 'reference/mongodb/bson/binary/fromvector.xml', ), 'history' => array ( ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); contributors($setup); ?>
(mongodb >=2.2.0)
MongoDB\BSON\Binary::fromVector — Creates a new binary with subtype MongoDB\BSON\Binary::SUBTYPE_VECTOR from the given array and vector type
$vector, MongoDB\BSON\VectorType $vectorType): MongoDB\BSON\Binaryvector (array)
An array of values representing the vector data. The type of each value must match the type indicated by the vectorType parameter:
vectorType (MongoDB\BSON\VectorType)The vector data type.
Returns a new Binary with subtype MongoDB\BSON\Binary::SUBTYPE_VECTOR.