MongoId::isValid

Check if a value is a valid ObjectId

Hinweis:

This extension that defines this method is deprecated. Instead, the MongoDB extension should be used. There is no equivalent for this method in the new extension.

Beschreibung

public static bool MongoId::isValid ( mixed $value )

This method may be used to check a variable before passing it as an argument to MongoId::__construct.

Parameter-Liste

value

The value to check for validity.

Rückgabewerte

Returns TRUE if value is a MongoId instance or a string consisting of exactly 24 hexadecimal characters; otherwise, FALSE is returned.