MongoDB\BSON\ObjectId::__construct Construit un nouvel ObjectId &reftitle.description; final public MongoDB\BSON\ObjectId::__construct stringid &reftitle.parameters; id (string) Une chaîne héxadécimale de 24 caractères. Si elle n'est pas fournie, le driver génèrera un ObjectId. &reftitle.errors; &mongodb.throws.argumentparsing; Lance une exception MongoDB\Driver\Exception\InvalidArgumentException si id n'est pas une chaîne héxadécimale de 24 caractères. &reftitle.examples; Exemple avec <function>MongoDB\BSON\ObjectId::__construct</function> ]]> &example.outputs.similar; string(24) "56732d3dda14d81214634921" } object(MongoDB\BSON\ObjectId)#1 (1) { ["oid"]=> string(24) "000000000000000000000001" } ]]> &reftitle.seealso; La référence ObjectId Le type BSON : ObjectId