DeleteModel
Contract for models able to delete a document.
A DeleteModel exposes a single DeleteModel::delete() operation that
removes one (or, depending on the options, several) document(s) from the
underlying storage. To wipe an entire collection at once, see
DeleteAllModel or TruncateModel.
Tags
Table of Contents
Methods
- delete() : null|array<string|int, mixed>|object
- Deletes a document, or a set of documents, in the model.
Methods
delete()
Deletes a document, or a set of documents, in the model.
public
delete([array<string|int, mixed> $init = [] ]) : null|array<string|int, mixed>|object
Parameters
- $init : array<string|int, mixed> = []
-
Operation options identifying what to delete, typically a
key/id, a set ofconditionswith theirbindsand an optional return clause.
Tags
Return values
null|array<string|int, mixed>|object —The deleted document(s) when the implementation
returns them, otherwise null.