MongoId::isValid

Check if a value is a valid ObjectId

注意:

このメソッドを定義している拡張モジュールは非推奨です。 かわりに MongoDB 拡張モジュールを使うべきです。 このメソッドの代替は、新しい拡張モジュールには存在しません。

説明

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.

パラメータ

value

The value to check for validity.

返り値

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