public function HydratorListener::attach in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/zendframework/zend-hydrator/src/Aggregate/HydratorListener.php \Zend\Hydrator\Aggregate\HydratorListener::attach()
File
- vendor/
zendframework/ zend-hydrator/ src/ Aggregate/ HydratorListener.php, line 39
Class
- HydratorListener
- Aggregate listener wrapping around a hydrator.
Namespace
Zend\Hydrator\AggregateCode
public function attach(EventManagerInterface $events, $priority = 1) {
$this->listeners[] = $events
->attach(HydrateEvent::EVENT_HYDRATE, [
$this,
'onHydrate',
], $priority);
$this->listeners[] = $events
->attach(ExtractEvent::EVENT_EXTRACT, [
$this,
'onExtract',
], $priority);
}