public function AggregateHydrator::add in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/zendframework/zend-hydrator/src/Aggregate/AggregateHydrator.php \Zend\Hydrator\Aggregate\AggregateHydrator::add()
Attaches the provided hydrator to the list of hydrators to be used while hydrating/extracting data
Parameters
HydratorInterface $hydrator:
int $priority:
File
- vendor/
zendframework/ zend-hydrator/ src/ Aggregate/ AggregateHydrator.php, line 35
Class
- AggregateHydrator
- Aggregate hydrator that composes multiple hydrators via events
Namespace
Zend\Hydrator\AggregateCode
public function add(HydratorInterface $hydrator, $priority = self::DEFAULT_PRIORITY) {
$this
->getEventManager()
->attachAggregate(new HydratorListener($hydrator), $priority);
}