Skip to content

Commit b646280

Browse files
committed
PHP-1310 & PHP-1311: Collection::update[One|Many]()
1 parent 195e5af commit b646280

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Collection.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,5 +209,11 @@ function deleteOne(array $filter) { /* {{{ */
209209
function deleteMany(array $filter) { /* {{{ */
210210
return $this->_writeSingle($filter, self::DELETE, array("limit" => 0));
211211
} /* }}} */
212+
function updateOne(array $filter, $update, array $options = array()) { /* {{{ */
213+
return $this->_writeSingle($filter, self::UPDATE, $options, $update);
214+
} /* }}} */
215+
function updateMany(array $filter, $update, array $options = array()) { /* {{{ */
216+
return $this->_writeSingle($filter, self::UPDATE, $options + array("limit" => 0), $update);
217+
} /* }}} */
212218
}
213219

0 commit comments

Comments
 (0)