MongoId
class MongoId (View source)
A unique identifier created for database objects.
Properties
string | $id |
Methods
(PECL mongo >= 0.8.0) Check if a value is a valid ObjectId
(PECL mongo >= 0.8.0) Returns a hexadecimal representation of this id
(PECL mongo >= 1.0.11) Gets the incremented value to create this id
(PECL mongo >= 1.0.11) Gets the process ID
(PECL mongo >= 1.0.1) Gets the number of seconds since the epoch that this id was created
(PECL mongo >= 1.0.8) Gets the hostname being used for this machine's ids
(PECL mongo >= 1.0.8) Create a dummy MongoId
Details
__construct(MongoId|string $id = null)
(PECL mongo >= 0.8.0) Creates a new id
static bool
isValid(mixed $value)
(PECL mongo >= 0.8.0) Check if a value is a valid ObjectId
string
__toString()
(PECL mongo >= 0.8.0) Returns a hexadecimal representation of this id
int
getInc()
(PECL mongo >= 1.0.11) Gets the incremented value to create this id
int
getPID()
(PECL mongo >= 1.0.11) Gets the process ID
int
getTimestamp()
(PECL mongo >= 1.0.1) Gets the number of seconds since the epoch that this id was created
static string
getHostname()
(PECL mongo >= 1.0.8) Gets the hostname being used for this machine's ids
static MongoId
__set_state(array $props)
(PECL mongo >= 1.0.8) Create a dummy MongoId