/** * Append data to the session * * @param mixed $varData The data object or array * * @throws \Exception If $varData is not an array or object */ public function appendData($varData) { if (is_object($varData)) { $varData = get_object_vars($varData); } if (!is_array($varData)) { throw new \Exception('Array or object required to append session data'); } foreach ($varData as $k => $v) { // Map the referer (see #281) if (in_array($k, $this->mappedKeys)) { $this->session->set($k, $v); } else { $this->sessionBag->set($k, $v); } } }
/** * Append data to the session * * @param mixed $varData The data object or array * * @throws \Exception If $varData is not an array or object */ public function appendData($varData) { @trigger_error('Using Session::appendData() has been deprecated and will no longer work in Contao 5.0. Use the Symfony session via the container instead.', E_USER_DEPRECATED); if (is_object($varData)) { $varData = get_object_vars($varData); } if (!is_array($varData)) { throw new \Exception('Array or object required to append session data'); } foreach ($varData as $k => $v) { // Map the referer (see #281) if ($k == 'referer') { $this->session->set('referer', $v); } else { $this->sessionBag->set($k, $v); } } }
/** * @param string $gssfId * @param string $procedureId */ public function startVerification($gssfId, $procedureId) { $this->state->set('current_verification', ['procedureId' => $procedureId, 'gssfId' => $gssfId]); }
public function set($key, $value) { $this->bag->set($key, $value); }