/**
  * Set validation result
  *
  * @param Opifer\QueueIt\Queue\Queue                        $queue
  * @param Opifer\QueueIt\Validation\AcceptedConfirmedResult $validationResult
  *
  * @return void
  */
 public function setValidationResult($queue, $validationResult)
 {
     if ($validationResult instanceof AcceptedConfirmedResult) {
         $key = $this->generateKey($queue->getCustomerId(), $queue->getEventId());
         $_SESSION[$key] = $validationResult;
     }
 }
 /**
  * Write cookie
  *
  * @param Opifer\QueueIt\Queue\Queue $queue
  * @param string                     $queueId
  * @param string                     $originalUrl
  * @param integer                    $placeInQueue
  * @param string                     $redirectType
  * @param integer                    $timeStamp
  * @param string                     $hash
  *
  * @return void
  */
 private function writeCookie($queue, $queueId, $originalUrl, $placeInQueue, $redirectType, $timeStamp, $hash)
 {
     global $cookieDomain;
     global $cookieExpiration;
     $expires = time() + $cookieExpiration;
     $key = $this->generateKey($queue->getCustomerId(), $queue->getEventId());
     setcookie($key . "[QueueId]", $queueId, $expires, null, $cookieDomain, false, true);
     setcookie($key . "[OriginalUrl]", $originalUrl, $expires, null, $cookieDomain, false, true);
     setcookie($key . "[PlaceInQueue]", KnownUserFactory::encryptPlaceInQueue($placeInQueue), $expires, null, $cookieDomain, false, true);
     setcookie($key . "[RedirectType]", $redirectType, $expires, null, $cookieDomain, false, true);
     setcookie($key . "[TimeStamp]", $timeStamp, $expires, null, $cookieDomain, false, true);
     setcookie($key . "[Hash]", $hash, $expires, null, $cookieDomain, false, true);
 }