public function __toString() { return (string) $this->objectID; }
public function __construct($value = null) { if (!$value instanceof \MongoId) { $value = new \MongoId($value); } $this->value = $value->__toString(); }