You are browsing a version that has not yet been released. |
Introduction
Hydrators insert an array of data into object properties (this is called "hydrating") and convert object properties back to an array (this is called "extracting"). Hydrators are often used in the context of Forms, with the binding functionality of Laminas, but can also be used in any hydrating/extracting context (for instance, it can be used in RESTful context). For an introduction to hydrators, please read Laminas hydrator documentation.
Installation
Run the following to install this library:
$ composer require doctrine/doctrine-laminas-hydrator
Next Steps
Table of Contents
- Basic Usage: introduces the hydrator, hydrating by value or by reference, strategies, filters and naming strategies.
- Working with Associations: explains how associated entities and collections are hydrated and extracted.
- Working with Embeddables: explains how embeddables are hydrated and extracted.
- Converting Custom DBAL Types: explains how values are converted based on the Doctrine mapping, including enums and custom DBAL types.
- Example Usage with Laminas Form: shows a complete example with the Laminas form library.
- Example Usage in an API Context: shows a complete example of an API exchanging entities as JSON.
- Performance Considerations: some remarks to consider for keeping your application performant.
- Upgrading to v4: lists the changes when upgrading from version 3, and how to adapt to them.
