private function createObjectID($id)
{
try {
if (is_string($id)) {
$this->objectID = new ObjectID($id);
} elseif ($id instanceof self || $id instanceof ObjectID) {
$this->objectID = new ObjectID((string) $id);
} else {
$this->objectID = new ObjectID();
}
} catch (\Exception $e) {
throw new MongoException('Invalid object ID', 19);
}
}