open() public méthode

public open ( $save_path, $name )
 /**
  * {@inheritdoc}
  */
 public function open($savePath, $sessionName)
 {
     $return = (bool) $this->handler->open($savePath, $sessionName);
     if (true === $return) {
         $this->active = true;
     }
     return $return;
 }
 /**
  * {@inheritdoc}
  */
 public function open($save_path, $name)
 {
     $trace = \Drupal::service('session_test.session_handler_proxy_trace');
     $trace[] = ['BEGIN', $this->optionalArgument, __FUNCTION__];
     $result = $this->sessionHandler->open($save_path, $name);
     $trace[] = ['END', $this->optionalArgument, __FUNCTION__];
     return $result;
 }
Exemple #3
0
 protected function initializeSession()
 {
     $this->data = [];
     $this->dataHash = null;
     $this->handler->open(null, $this->name);
     if (empty($this->id)) {
         $this->id = $this->generator->generateId();
     }
     $this->collectGarbage();
     // Must be done before read
     $data = $this->handler->read($this->id);
     if (!$data) {
         // Intentionally catch falsely values
         return;
     }
     if ($this->options->getBoolean('lazy_write', false)) {
         $this->dataHash = md5($data);
     }
     try {
         $this->data = $this->serializer->unserialize($data);
     } catch (\Exception $e) {
         // Destroy data upon unserialization error
         $this->handler->destroy($this->id);
     }
 }
Exemple #4
0
 protected function initializeSession()
 {
     $this->handler->open(null, $this->id);
     $data = $this->handler->read($this->id);
     try {
         $this->data = $this->serializer->unserialize($data);
     } catch (\Exception $e) {
         // Destroy data upon unserialization error
         $this->handler->destroy($this->id);
     }
 }
 /**
  * {@inheritdoc}
  */
 public function open($savePath, $sessionId)
 {
     return $this->wrappedSessionHandler->open($savePath, $sessionId);
 }
Exemple #6
0
 /**
  * {@inheritdoc}
  */
 public function open($savePath, $sessionName)
 {
     return (bool) $this->handler->open($savePath, $sessionName);
 }