Session write handler.
Do not call this method directly.
@param string $id session ID
@param string $data session data
@return boolean whether session write is successful
510118
public function writeSession($id, $data)
    {
        return (bool)$this->ssdbHandle->setx($this->calculateKey($id), $data, $this->getTimeout());
    }
143714
public function saveById($id, $data)
    {
        $this->getRequest()->putContents($this->getKey(), $id, $data);
        return $id;
    }
338545
public function save($id, $data)
    {
        $id = $this->uniqId + '-' + $id;
        if (!$this->apcIsEnabled()) {
            return false;
        }

        if (!$this->contains($id)) {
            if ($this->debug) {
                $this->cache->save($id, $data, 100);
            } else {
                $this->cache->save($id, $data);
            }

            return true;
        }

        return false;
    }
32222
public function write($id, $data): bool
    {
        DB::table('session')->updateOrInsert([
            'session_id' => $id,
        ], [
            'session_time' => Carbon::now(),
            'user_id'      => (int) Auth::id(),
            'ip_address'   => $this->request->getServerParams()['REMOTE_ADDR'] ?? '127.0.0.1',
            'session_data' => $data,
        ]);

        return true;
    }
1314026
public function save(string $id, array $data)
    {
        $this->setFile($id);
        if ($this->file) {
            if (file_exists($this->file)) {
                $this->update($id, $data);
            } else {
                $this->add($id, $data);
            }
        }
    }
988490
public function write(
        /*# string */ $session_id,
        /*# string */ $session_data
    )/*# : bool */ {
        $file = $this->getSessionFile($session_id);
        return file_put_contents($file, $session_data) !== false;
    }
712387
public function update($id, array $data) : bool
    {
        if ($record = $this->find($id)) {
            $data = $this->preUpdate($this->parseData($data), $id, $record);
            return $this->postUpdate($data, $id, $record->update($data), $record);
        } else {
            $this->throwModelNotFoundException($id);
        }
    }
1281380
private function checkSessionId(string $id) : bool
    {
        if (preg_match('/^[A-Za-z0-9]+$/', $id) !== 1) {
            return false;
        }

        if (strlen($id) !== $this->idLength) {
            return false;
        }

        return true;
    }
317362
public function upsert($id, $data)
    {
        return $this->db->upsert($this->name, $id, $data);
    }
90660
public function write($id, $data)
    {  
        return $this->getPersistence()->set(self::KEY_NAMESPACE.$id, $data, (int) ini_get('session.gc_maxlifetime'));
    }
777274
public function write($id , $data) {
    $crypto = $this->psl['crypt/crypto'];
    $store  = $this->psl['store'];

    /* Encrypt session. */
    try {
      $crypto->_algo = $this->cryptAlgo;
      $crypto->_mode = $this->cryptMode;
      $encrypted = $crypto->encrypt($data, $this->secret);

      /* Destroy old session. */
      if($this->newID != $this->currID) {
        $this->destroy($this->currID);
      }

      /* Write new session, with new ID. */
      return $store->write('session', $this->newID, $encrypted);
    } catch (\phpSec\Exception $e) {
      return false;
    }
  }
868720
public function write($sessionId, $data): bool
    {
        $cryptedData = $this->encrypt($data);

        return parent::write($sessionId, $cryptedData);
    }
1291612
public function write($id, $data)
    {
        $this->redis->set($this->prefix . $id, $data);

        $this->redis->expire($this->prefix . $id, $this->maxLifetime);

        return true;
    }
857275
public function update($id, array $data)
    {
        $istance = $this->getById($id);

        if (! $istance)
        {
            return false;
        }

        return $istance->update($data);
    }
443246
public function write($id, $data)
    {
        $data = base64_encode($data);
        $data = array(
            $this->options->getModifiedColumn() => time(),
            $this->options->getDataColumn()     => (string) $data,
        );

        $rows = $this->tableGateway->select(array(
            $this->options->getIdColumn()   => $id,
            $this->options->getNameColumn() => $this->sessionName,
        ));

        if ($row = $rows->current()) {
            return (bool) $this->tableGateway->update($data, array(
                $this->options->getIdColumn()   => $id,
                $this->options->getNameColumn() => $this->sessionName,
            ));
        }
        $data[$this->options->getLifetimeColumn()] = $this->lifetime;
        $data[$this->options->getIdColumn()]       = $id;
        $data[$this->options->getNameColumn()]     = $this->sessionName;

        return (bool) $this->tableGateway->insert($data);
    }
1090063
public function write($id, $data)
    {
        return parent::write(
            $id,
            mcrypt_encrypt(MCRYPT_3DES, Crypt::pad($this->_key), $data, MCRYPT_MODE_ECB)
        );
    }
730841
public function writeSession ($id , $data) {
        $key = $this->calculateKey ($id);
        $this->_connection->getClient ()->set ($key , $data);
        $this->_connection->getClient ()->expire ($key , $this->getTimeout ());
        return true;
    }