MongoId::__construct
Creates a new id
&reftitle.description;
MongoId::__construct
stringid&null;
&reftitle.parameters;
id
A string to use as the id. Must be 24 hexidecimal characters. If an
invalid string is passed to this constructor, the constructor will ignore
it and create a new id value.
&reftitle.returnvalues;
Returns a new id.
&reftitle.examples;
MongoId::__construct example
This example shows how to create a new id. This is seldom necessary, as the
driver adds an id to arrays automatically before storing them in the
database.
]]>
&example.outputs.similar;
Parameter example
This example shows how to use a string parameter to initialize a MongoId with a given value.
]]>
&example.outputs.similar;
&reftitle.seealso;
MongoId::__toString