yii\mongodb\Session::writeSession PHP Метод

writeSession() публичный Метод

Do not call this method directly.
public writeSession ( string $id, string $data ) : boolean
$id string session ID
$data string session data
Результат boolean whether session write is successful
    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) {
            $exception = ErrorHandler::convertExceptionToString($e);
            // its too late to use Yii logging here
            error_log($exception);
            echo $exception;
            return false;
        }
        return true;
    }