MongoId::isValid
(PECL mongo >= 1.5.0)
MongoId::isValid — Check if a value is a valid ObjectId
Descrição
This method may be used to check a variable before passing it as an argument to MongoId::__construct().
Parâmetros
-
value -
The value to check for validity.
Valor Retornado
Returns TRUE if value is a
MongoId instance or a string consisting of exactly 24
hexadecimal characters; otherwise, FALSE is returned.