Ejemplo n.º 1
0
 public function __construct($name, $realHandler, $id = null)
 {
     $lockingSessionHandler = new LockingSessionHandler($realHandler);
     return parent::__construct($name, $lockingSessionHandler, $id);
 }
 /**
  * Create a new session instance.
  *
  * @param  string $name
  * @param  \SessionHandlerInterface $handler
  * @param  \Illuminate\Contracts\Encryption\Encrypter $encrypter
  * @param  string|null $id
  * @return void
  */
 public function __construct($name, SessionHandlerInterface $handler, EncrypterContract $encrypter, $id = null)
 {
     $this->encrypter = $encrypter;
     parent::__construct($name, $handler, $id);
 }
Ejemplo n.º 3
0
 public function start()
 {
     $name = $this->config['cookie'];
     $lifetime = $this->config['lifetime'];
     $sessionId = $this->generateSessionId();
     if ($this->config['driver'] instanceof SessionHandlerInterface) {
         $this->setSessionHandler($this->config['driver']);
         parent::__construct($name, $this->Handler);
         return $this->dispatch();
     }
     switch ($this->config['driver']) {
         case 'database':
             parent::__construct($name, $this->databaseHandler());
             break;
         case 'file':
             parent::__construct($name, $this->fileHandler());
             break;
         default:
         case 'array':
             parent::__construct($name, $this->arrayHandler());
             break;
     }
     return $this->dispatch();
 }