/** * Return the session data as array * * @return array The session data */ public function getData() { @trigger_error('Using Session::getData() has been deprecated and will no longer work in Contao 5.0. Use the Symfony session via the container instead.', E_USER_DEPRECATED); $data = $this->sessionBag->all(); unset($data['referer']); // Map the referer (see #281) if ($this->session->has('referer')) { $data['referer'] = $this->session->get('referer'); } return $data; }
/** * Return the session data as array * * @return array The session data */ public function getData() { $data = $this->sessionBag->all(); // Map the referer (see #281) foreach ($this->mappedKeys as $strKey) { unset($data[$strKey]); if ($this->session->has($strKey)) { $data[$strKey] = $this->session->get($strKey); } } return $data; }