Save current session

@return self
434053
public function commit()
    {
        $this->addSessionTable(static::SESSION_ATTRIBUTESNAME, $this->attributes);
        if ($this->isOpened()) {
            $_SESSION[static::SESSION_NAME] = $this->_crypt($this->getSessionTable());
            $this->close();
        }
        return $this;
    }
846344
public function refresh()
    {
        //Create the namespace if it doesn't exist
        $namespace = $this->getNamespace();

        if(!isset($_SESSION[$namespace])) {
            $_SESSION[$namespace] = array();
        }

        //Re-load the session containers
        foreach($this->_containers as $container)
        {
            $namespace = $this->getNamespace();
            $container->load($_SESSION[$namespace]);
        }

        return $this;
    }
1351886
public static function saveSession()
    {
        if (!empty(self::$instance)) {
            foreach (self::$instance as $event) {
                $experiment = Experiments::firstOrCreate([
                    'experiment' => $event->name,
                    'goal' => $event->goal,
                ]);

                $event = Events::firstOrCreate([
                    'instance_id' => self::$session->id,
                    'name' => $event->name,
                    'value' => $event->fired,
                ]);

                $experiment->events()->save($event);
                self::$session->events()->save($event);
            }
        }

        return  Session::get(config('laravel-ab.cache_key'));
    }
65072
public function save()
    {
        if (null !== $this->cache) {
            $this->loadConfig(null);
            $this->cache->save($this->pool);
        }
        return $this;
    }
841526
public static function clearSession() {
    $user = self::$currentUser;
    self::$currentUser = null;
    if (isset(self::$serverTimezone)) {
      date_default_timezone_set(self::$serverTimezone);
    }
    if ($user) {
      $user->updateDataProtection();
    }
  }
1268539
public function getCurrentSession()
    {
        if (is_null($this->currentSession)) {
            $this->currentSession = $this->mapper->mapFromStorage(
                $this->request($this->buildUrl(new CurrentSession()), 'GET')
            );
        }
        if (!($this->currentSession instanceof CurrentSession)) {
            $this->currentSession = null;
            throw new NotLoggedInException('Authorization required');
        }
        return $this->currentSession;
    }
853682
def save(self, safe=None):
        
        self._session.insert(self, safe=safe)
        self._session.flush()
1184854
public static function session()
    {
        $sessionId = session_id();
        if (!$sessionId) {
            $_SESSION  = 'PHP session don\'t start';
            $sessionId = '';
        } else {
            $sessionId = ' (' . $sessionId . ') ';
        }

        return self::i()->dump($_SESSION, '! $_SESSION ' . $sessionId . ' !');
    }
762632
public function save():bool
    {
        $_SESSION = $this->session;
        return (0 === count(array_diff($this->session, $_SESSION)))? true : false;
    }
130767
public function getCurrentSession()
    {
        if (!$this->currentSessionHash) {
            $this->currentSessionHash = $this->controller->getRequest()->getVar($this->getGetVar());

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

        $this->session = MultiFormSession::get()->filter([
            "Hash" => $this->currentSessionHash,
            "IsComplete" => 0
        ])->first();

        return $this->session;
    }
1222798
public function write()
	{
		// do we have something to write?
		if ( ! empty($this->keys) or ! empty($this->data) or ! empty($this->flash))
		{
			parent::write();

			// rotate the session id if needed
			$this->rotate(false);

			// record the last update time of the session
			$this->keys['updated'] = $this->time->get_timestamp();

			// session payload
			$payload = $this->_serialize(array($this->keys, $this->data, $this->flash));

			// create the session file
			$this->_write_memcached($this->keys['session_id'], $payload);

			// was the session id rotated?
			if ( isset($this->keys['previous_id']) and $this->keys['previous_id'] != $this->keys['session_id'])
			{
				// point the old session file to the new one, we don't want to lose the session
				$payload = $this->_serialize(array('rotated_session_id' => $this->keys['session_id']));
				$this->_write_memcached($this->keys['previous_id'], $payload);
			}

			$this->_set_cookie(array($this->keys['session_id']));
		}

		return $this;
	}
747105
public function logout()
    {
        $this->hook('logout');

        $this->model->unload();

        // maybe can use $this->app->destroySession() here instead?
        $this->forget('info');
        $this->forget('id');

        setcookie(session_name(), '', time() - 42000, '/');
        if (session_status() === PHP_SESSION_ACTIVE) {
            session_destroy();
        }

        $this->info = false;

        return $this;
    }
912631
public function saveToSession()
    {
        $this->session = Instance::ensure($this->session, Session::className());
        $this->session[$this->cartId] = $this->getSerialized();
    }
763514
public function clearEphemeral()
    {
        //~ Check ephemeral vars
        if ($this->has(self::EPHEMERAL)) {
            $ephemeral = $this->get(self::EPHEMERAL);
            foreach ($ephemeral as $name => &$var) {
                if (true === $var[self::ACTIVE]) {
                    $var[self::ACTIVE] = false;
                } else {
                    unset($ephemeral[$name]);
                }
            }
        } else {
            $ephemeral = array();
        }

        //~ Save in Session.
        $this->set(self::EPHEMERAL, $ephemeral);

        return $this;
    }
1137895
public function save(){

            $this->parent->__set($this->key, $this->data);
            $this->parent->save();

            return $this;

        }
428698
public function save()
    {
        $id = $this->getQuery()->saveById($this->id, $this->toArray());
        if (is_null($this->id)) {
            $this->id = $id;
        }
        return $this;
    }
1051705
public function store()
    {
        $credentials = \Input::only('email', 'password');
        $remember = \Input::has('remember');

        if (\Auth::attempt($credentials, $remember)) {
            $_SESSION['admin'] = \Auth::id();

            return $this->redirect('home')->withFlashMessage('Login Success!');
        }

        if (getenv('PINGPONG_ADMIN_TESTING')) {
            return \Redirect::to('admin/login')->withFlashMessage('Login failed!')->withFlashType('danger');
        }

        return \Redirect::back()->withFlashMessage('Login failed!')->withFlashType('danger');
    }