Пример #1
0
 /**
  * @param string $gssfId
  * @return VerificationResult
  */
 public function verify($gssfId)
 {
     $verification = $this->state->remove('current_verification');
     if (!$verification) {
         return VerificationResult::noSuchProcedure();
     }
     if ($gssfId === $verification['gssfId']) {
         return VerificationResult::verificationSucceeded($verification['procedureId']);
     }
     return VerificationResult::verificationFailed($verification['procedureId']);
 }
Пример #2
0
 /**
  * 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);
         }
     }
 }
Пример #3
0
 /**
  * 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);
         }
     }
 }
 public function set($key, $value)
 {
     $this->bag->set($key, $value);
 }