Write session data

@param  string $id
@param  string $data

@return bool
559741
public function write($id, $data): bool
    {
        return $this->handler->set($this->prepareId($id), $data, (int)$this->ttl);
    }
966893
public function write($session_id, $session_data)
	{
		$this->files->put($this->path . DS . $session_id, $session_data, true);
	}
268127
public function do_write($session_id, $data, $ttl)
    {
        $redis = is_object($this->_redis) ? $this->_redis : $this->_getRedis();
        return $redis->set($this->_prefix . $session_id, $data, $ttl);
    }
164472
public function writeSession($id, $data)
    {
        // exception must be caught in session write handler
        // http://us.php.net/manual/en/function.session-set-save-handler.php
        try {
            $this->db->getCollection($this->sessionCollection)->update(
                ['id' => $id],
                $this->composeFields($id, $data),
                ['upsert' => true]
            );
        } catch (\Exception $e) {
            Yii::$app->errorHandler->handleException($e);
            return false;
        }

        return true;
    }
931780
public function write($sid, /*string*/ $data)
    {
        //update/insert our session data
        if (!$this->sessionDoc) {
            $this->sessionDoc = array();
            $this->sessionDoc['_id'] = $sid;
            $this->sessionDoc['started'] = new MongoDate();
        }

        //there could have been a session regen so we need to be careful with the $sid here and set it anyway
        if ($this->sid != $sid) {
            //need to unlock old sid
            $this->unlock($this->sid);

            //set the new one
            $this->sid = $sid;
            $this->lock($this->sid);//@TODO shouldn't we try to see if this succeeded first?

            //and also make sure we're going to write to the correct document
            $this->sessionDoc['_id'] = $sid;
        }

        $this->sessionDoc['last_accessed'] = new MongoDate();
        $this->sessionDoc['data'] = new MongoBinData($data, MongoBinData::BYTE_ARRAY);

        $this->sessions->save($this->sessionDoc, $this->getConfig('write_options'));

        return true;
    }
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;
    }
929330
public function do_write($session_id, $data, $ttl)
    {
        /** @var \ManaPHP\DbInterface $db */
        $db = $this->_di->getShared($this->_db);

        $field_values = [
            'user_id' => $this->identity->getId(0),
            'client_ip' => $this->request->getClientIp(),
            'data' => $data,
            'updated_time' => time(),
            'expired_time' => $ttl + time()
        ];

        if ($db->query($this->_source)->exists()) {
            $db->update($this->_source, $field_values, ['session_id' => $session_id]);
        } else {
            $field_values['session_id'] = $session_id;
            $db->insert($this->_source, $field_values);
        }

        return true;
    }
1183516
public function write($id, $data) {
        if (headers_sent() && !$this->sent)
            throw new \LogicException('Session data must be written before headers are sent');
        if (!$this->sent) {
            $expires = null;
            if ($ttl = $this->getLifetime()) {
                $expires = time() + $ttl;
            }
            $this->sent = setcookie(
                $this->name,
                $this->getCipher()->encrypt($data),
                $expires,
                '/',
                $this->getDomain(),
                null,
                true
            );
        }
        return (bool) $this->sent;
    }
863634
public function write($session_id, $session_data)
    {
        return $this->memcached->set($session_id, $session_data, $this->expire);
    }
857275
public function update($id, array $data)
    {
        $istance = $this->getById($id);

        if (! $istance)
        {
            return false;
        }

        return $istance->update($data);
    }
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;
    }
1168217
public function write($id, $data)
    {
        try {
            $result = $this->db->from($this->table)
                ->where($this->columns['id'])->eq($id)
                ->count();

            if ($result != 0) {
                return (bool) $this->db->update($this->table)
                        ->where($this->columns['id'])->eq($id)
                        ->set(array(
                            $this->columns['data'] => $data,
                            $this->columns['expires'] => time() + $this->maxLifetime,
                ));
            } else {
                return $this->db->insert(array(
                            $this->columns['id'] => $id,
                            $this->columns['data'] => $data,
                            $this->columns['expires'] => time() + $this->maxLifetime
                        ))
                        ->into($this->table);
            }
        } catch (PDOException $e) {
            return false;
        }
    }
680926
public function write( $id, $data, $next ) {
		$item       = new Option( $data );
		$session_id = $this->sanitize( $id );
		add_option( "_wp_session_{$session_id}", $item->data, '', 'no' );
		add_option( "_wp_session_expires_{$session_id}", $item->time, '', 'no' );

		return $next( $id, $data );
	}
602891
public function write($id, $data, $next)
    {
        $item = new MemoryItem($data);
        $this->cache[$id] = $item;

        return $next($id, $data);
    }
306404
public function write($session_id, $session_data)
    {
        $this->sessions[$session_id] = [
            'time' => $this->createTimestamp(),
            'data' => $session_data
        ];

        return true;
    }
434877
public function send($data, $id = null)
    {
        if (!isset($id)) {
            $id = $this->lastId++;
        }
        $this->putLine('id: ' . $id);
        $this->putLine('data: ' . $data);
        $this->putLine();
        $this->flush();
    }
62219
public function write($id, $data)
    {
        $session = $this->entityManager->find($this->entityManager, $id);
        if (null === $session) {
            $session = new $this->entityName();
            $session->{$this->primaryKeyColumn} = $id;
        }

        $session->{$this->dataColumn} = $data;
        $session->{$this->lifetimeColumn} = $this->lifetime;
        $session->{$this->modifiedColumn} = time();
        $this->entityManager->persist($session);

        try {
            $this->entityManager->flush();
            return true;
        } catch (\Doctrine\ORM\OptimisticLockException $exc) {
            return false;
        }
    }