hasDocument() public method

Check if document belongs to collection
public hasDocument ( Document $document ) : type
$document Document
return type
Example #1
0
 /**
  * Check if document belongs to specified collection
  *
  * @deprecated since 1.12.8 Use Collection::hasDocument()
  * @param \Sokil\Mongo\Collection $collection collection instance
  * @return boolean
  */
 public function belongsToCollection(Collection $collection)
 {
     return $collection->hasDocument($this);
 }