/** * 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(); } }
/** * 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, []); }