Skip to content

Commit 00c0810

Browse files
committed
Update README.md regarding DocumentFactory [skip ci]
1 parent 3003245 commit 00c0810

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

README.MD

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -253,12 +253,11 @@ $repository->all(['include' => 'author', 'page' => ['limit' => 15, 'offset' => 0
253253
```
254254

255255

256-
## ItemDocumentBuilder
256+
## DocumentFactory
257257

258-
The `Repository` and `DocumentClient` require `ItemDocumentInterface` instances when creating or updating resources.
259-
Such documents can easily be created using the `ItemDocumentBuilder`.
260-
This builder takes an `ItemInterface` instance, usually created by the [TypeMapper](#typemapper), an array of attributes and optionally an id.
261-
Internally, it uses the [ItemHydrator](#itemhydrator) to hydrate the `ItemInterface` with the provided attributes before it creates the `ItemDocument`.
258+
The `Repository` and `DocumentClient` both require `ItemDocumentInterface` instances when creating or updating resources.
259+
Such documents can easily be created using the `DocumentFactory` by giving it a `DataInterface` instance.
260+
This can be an `ItemInterface`, usually created by the [ItemHydrator](#itemhydrator), or a `Collection`.
262261

263262

264263
## ItemHydrator

0 commit comments

Comments
 (0)