/** * When executed in a hydrate() loop we may have to clear internal state to * decrease memory consumption. * * @param mixed $eventArgs * * @return void */ public function onClear($eventArgs) { parent::onClear($eventArgs); $aliases = array_keys($this->identifierMap); $this->identifierMap = array(); foreach ($aliases as $alias) { $this->identifierMap[$alias] = array(); } }
/** * {@inheritdoc} */ protected function cleanup() { $eagerLoad = isset($this->_hints['deferEagerLoad']) && $this->_hints['deferEagerLoad'] == true; parent::cleanup(); $this->_identifierMap = $this->_initializedCollections = $this->_existingCollections = $this->_resultPointers = array(); if ($eagerLoad) { $this->_em->getUnitOfWork()->triggerEagerLoads(); } }
/** * {@inheritdoc} */ protected function cleanup() { parent::cleanup(); $this->_uow->triggerEagerLoads(); $this->_uow->hydrationComplete(); }
/** * Gets the next set of results. * * @return array */ public function next() { $this->_current = $this->_hydrator->hydrateRow(); $this->_key++; return $this->_current; }
/** * {@inheritdoc} */ protected function _cleanup() { parent::_cleanup(); $this->_identifierMap = $this->_initializedCollections = $this->_existingCollections = $this->_resultPointers = array(); }
/** * When executed in a hydrate() loop we may have to clear internal state to * decrease memory consumption. * * @param mixed $eventArgs * * @return void */ public function onClear($eventArgs) { parent::onClear($eventArgs); $aliases = array_keys($this->identifierMap); $this->identifierMap = array_fill_keys($aliases, []); }
/** * {@inheritdoc} */ protected function cleanup() { $eagerLoad = isset($this->_hints[UnitOfWork::HINT_DEFEREAGERLOAD]) && $this->_hints[UnitOfWork::HINT_DEFEREAGERLOAD] == true; parent::cleanup(); $this->identifierMap = $this->initializedCollections = $this->existingCollections = $this->resultPointers = array(); if ($eagerLoad) { $this->_uow->triggerEagerLoads(); } $this->_uow->hydrationComplete(); }
/** * {@inheritdoc} */ protected function cleanup() { parent::cleanup(); $this->_identifierMap = $this->_resultPointers = array(); }