Skip to content

Commit

Permalink
change to state processors and providers (#1853)
Browse files Browse the repository at this point in the history
  • Loading branch information
zairigimad authored Dec 6, 2023
1 parent d55562b commit 74c59b3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions distribution/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -348,12 +348,12 @@ To retrieve and save data, API Platform proposes two main options (and we can mi

1. Writing our own [state providers](../core/state-providers.md) and [state processors](../core/state-processors.md) to fetch and save data in any persistence system and trigger our custom business logic.
This is what we recommend if you want to separate the public data model exposed by the API from the internal one, and to implement a layered architecture such as Clean Architecture or Hexagonal Architecture;
2. Using one of the various existing data providers and persisters allowing to automatically fetch and persist data using popular persistence libraries. Out of the box, data providers and persisters are provided for [Doctrine ORM](https://www.doctrine-project.org/projects/orm.html) and [Doctrine MongoDB ODM](../core/mongodb.md).
A data provider (but no persister yet) is also available for [Elasticsearch](../core/elasticsearch.md). [Pomm](https://github.com/pomm-project/pomm-api-platform) and [PHP Extended SQL](https://github.com/soyuka/esql#api-platform-bridge) also provides data providers and persisters for API Platform. We recommend this approach for Rapid Application Development.
2. Using one of the various existing state providers and processors allowing to automatically fetch and persist data using popular persistence libraries. Out of the box, state providers and processors are provided for [Doctrine ORM](https://www.doctrine-project.org/projects/orm.html) and [Doctrine MongoDB ODM](../core/mongodb.md).
A state provider (but no processor yet) is also available for [Elasticsearch](../core/elasticsearch.md). [Pomm](https://github.com/pomm-project/pomm-api-platform) and [PHP Extended SQL](https://github.com/soyuka/esql#api-platform-bridge) also provides state providers and processors for API Platform. We recommend this approach for Rapid Application Development.

Be sure to read the [General Design Considerations](../core/design.md) document to learn more about the architecture of API Platform and how to choose between these two approaches.

Here, we will use the built-in Doctrine ORM data provider in the rest of this tutorial.
Here, we will use the built-in Doctrine ORM state provider in the rest of this tutorial.

Modify the classes to map them to database tables using the attributes provided by the Doctrine ORM.

Expand Down

0 comments on commit 74c59b3

Please sign in to comment.