« MongoDB\BSON\Document::getIterator
MongoDB\BSON\Document::offsetExists »

MongoDB\BSON\Document::has

(mongodb >=1.16.0)

MongoDB\BSON\Document::has — Returns whether a key is present in the document

説明

final public function MongoDB\BSON\Document::has(string $key): bool

パラメータ

key (string)

The key to look for in the document.

戻り値

Returns true if the key is present in the document and false otherwise.

エラー / 例外

参考

関連キーワード:
MongoDB   Document   document   present   whether   getIterator   offsetExists   mongodb   final   look   otherwise   Throws   Driver   Exception   InvalidArgumentException   argument   parsing   errors   参考   Types
関連する関数・ページ:
mongodb-bson-document.offsetexists   mongodb-bson-document.get   mongodb-bson-document.offsetget   mongodb-bson-document.getiterator   mongodb-bson-document.fromphp   mongodb-bson-document.frombson