Write session data to the SessionHandler backend.

@param   string  $id    The session identifier.
@param   string  $data  The session data.

@return  boolean  True on success, false otherwise.

@since   1.0
@deprecated  2.0
359743
public function write($id, $data)
	{
		try
		{
			$query = $this->db->getQuery(true);
			$query->update($this->db->quoteName('#__session'))
				->set($this->db->quoteName('data') . ' = ' . $this->db->quote($data))
				->set($this->db->quoteName('time') . ' = ' . $this->db->quote((int) time()))
				->where($this->db->quoteName('session_id') . ' = ' . $this->db->quote($id));

			// Try to update the session data in the database table.
			$this->db->setQuery($query);

			if (!$this->db->execute())
			{
				return false;
			}

			// Since $this->db->execute did not throw an exception the query was successful.
			// Either the data changed, or the data was identical. In either case we are done.

			return true;
		}
		catch (\Exception $e)
		{
			return false;
		}
	}
1195138
public function sendEvent($id, $data, $eventName)
    {
        $this->sendBlock($id, $data, $eventName);
        $this->flush();
    }
1296399
public function pub($id, $data)
    {
        if (!isset($this->events[$id])) {
            return false;
        }
        return $this->events[$id]->pub($data);
    }
659712
public function write($sessionId, $data)
    {
        $this->cache->save($this->prefix . $sessionId, $data, $this->lifetime);
    }
1270116
public function sendBlock($id, $data, $name = null)
    {
        $this->output("id: {$id}\n");
        if (strlen($name) && $name !== null) {
            $this->output("event: {$name}\n");
        }
        $this->output($this->wrapData($data)."\n\n");
        flush();
    }
363086
public function write($id, $data)
    {
        return parent::write($id, $this->encrypt($data, $this->key));
    }
579512
public function write($id, $data)
    {
        $writer = $this->db->getWriter();

        $data = [
            $this->options['data_col'] => $data,
            $this->options['time_col'] => (int) time(),
            $this->options['id_col'] => $id,
        ];

        $writer->updateOne($this->options['table'], $data, $this->options['id_col']);

        if ($writer->countAffected()) {
            return true;
        }

        $writer->insertOne($this->options['table'], $data, $this->options['id_col']);

        return true;
    }
295549
public function write($id, $data) {
        $tmp = $_SESSION;
        session_decode($data);
        $newData  = $_SESSION;
        $_SESSION = $tmp;
        $key      = $this->getKey($id);
        return $this->mem->set($key, json_encode($newData), $this->ttl);
    }
1117564
public function destroySession($id)
	{
		$this->getDbConnection()->createCommand()
			->delete($this->sessionTableName,'id=:id',array(':id'=>$id));
		return true;
	}
541147
public function write($sessionId, $data): bool
    {
        $filename = $this->savePath . \DIRECTORY_SEPARATOR . $this->prefix . $sessionId;

        return \file_put_contents($filename, $data) === false ? false : true;
    }
1207254
public function write($id, $data)
    {
        return $this->getCache()->save(
            $data, 
            $this->normalizeId($id), 
            array(), 
            \Zend_Session::getOptions('gc_maxlifetime')
        );
    }
923803
public function write($id, $data)
    {
        if (!$data) 
            $this->getDbConnection()->executeQuery('DELETE FROM session_data WHERE id=?',[$id]);
            else $this->getDbConnection()->executeQuery('REPLACE INTO session_data SET timestamp=?, id=?, value=?',[time(),$id,$data]);
		return true;
    }
1114629
public function write($id, $data)
    {
        //dane nie uległy zmianie
        if ($data == $this->_data) {
            return true;
        }
        //niepoprawne ID
        if (!$this->_validate($id)) {
            return true;
        }
        //wyszukiwanie rekordu
        if (null === $record = (new Orm\SessionQuery)->findPk($id)) {
            //tworzenie nowego rekordu
            $record = new Orm\SessionRecord;
        }
        //puste dane sesyjne
        if (!$data) {
            //jeśli istniał rekord - usuwamy
            $record->id ? $record->delete() : null;
            return true;
        }
        //ustawianie danych i czasu
        $record->id = $id;
        $record->data = $data;
        $record->timestamp = time();
        //zapis rekordu
        return $record->save();
    }
143714
public function saveById($id, $data)
    {
        $this->getRequest()->putContents($this->getKey(), $id, $data);
        return $id;
    }
1098135
public function writeSession($id,$data)
	{
		return $this->_cache->set($this->calculateKey($id),$data,$this->getTimeout());
	}
857275
public function update($id, array $data)
    {
        $istance = $this->getById($id);

        if (! $istance)
        {
            return false;
        }

        return $istance->update($data);
    }
976774
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
		{
			$expire=time()+$this->getTimeout();
			$db=$this->getDbConnection();
			if($db->getDriverName()=='pgsql')
				$data=new CDbExpression($db->quoteValueWithType($data, PDO::PARAM_LOB)."::bytea");
			if($db->getDriverName()=='sqlsrv' || $db->getDriverName()=='mssql' || $db->getDriverName()=='dblib')
				$data=new CDbExpression('CONVERT(VARBINARY(MAX), '.$db->quoteValue($data).')');
			if($db->createCommand()->select('id')->from($this->sessionTableName)->where('id=:id',array(':id'=>$id))->queryScalar()===false)
				$db->createCommand()->insert($this->sessionTableName,array(
					'id'=>$id,
					'data'=>$data,
					'expire'=>$expire,
				));
			else
				$db->createCommand()->update($this->sessionTableName,array(
					'data'=>$data,
					'expire'=>$expire
				),'id=:id',array(':id'=>$id));
		}
		catch(Exception $e)
		{
			if(YII_DEBUG)
				echo $e->getMessage();
			// it is too late to log an error message here
			return false;
		}
		return true;
	}