mirror of
https://github.com/macintoshplus/mongo-php-driver.git
synced 2026-04-02 22:32:12 +02:00
33 lines
502 B
PHP
33 lines
502 B
PHP
<?php
|
|
|
|
namespace MongoDB\Write;
|
|
|
|
final class UpdateBatch extends WriteBatch
|
|
{
|
|
private $documents;
|
|
|
|
/**
|
|
* @see WriteBatch::add()
|
|
*/
|
|
public function add($document)
|
|
{
|
|
$this->documents[] = $document;
|
|
}
|
|
|
|
/**
|
|
* @see Countable::count()
|
|
*/
|
|
public function count()
|
|
{
|
|
return count($this->documents);
|
|
}
|
|
|
|
/**
|
|
* @see WriteBatch::getDocuments()
|
|
*/
|
|
public function getDocuments()
|
|
{
|
|
return $this->documents;
|
|
}
|
|
}
|