Skip to content
This repository has been archived by the owner on Jan 24, 2020. It is now read-only.

doctrine/doctrine-zend-hydrator

Repository files navigation

zend-doctrine-hydrator

Build Status Coverage Status

This library provides Doctrine Hydrators for Zend Framework application.

Installation

Run the following to install this library:

$ composer require webimpress/zend-doctrine-hydrator

Usage

You can use Zend\Doctrine\Hydrator\DoctrineObject hydrator with your zend-form:

$hydrator = new DoctrineObject($objectManager, $byValue);

$myForm = new MyForm();
$myForm->setHydrator($hydrator);

To initialize DoctrineObject hydrator you need to pass your ObjectManager (EntityManager) instance and flag, if hydrator should use entity's public API (by default it is true).