private function persist()
    {
        $items = $this->persistableList();

        $this->session->set('stack', $items);

        $user = $this->users->getCurrentUser();
        $user['stack'] = $items;
        $this->users->saveUser($user);
    }
private function persist()
    {
        $items = $this->persistableList();

        $this->session->set('stack', $items);

        $user = $this->users->getCurrentUser();
        $user['stack'] = $items;
        $this->users->saveUser($user);
    }
private function persist ( ) { $ items = $ this -> persistableList ( ) ; $ this -> session -> set ( 'stack' , $ items ) ; $ user = $ this -> users -> getCurrentUser ( ) ; $ user [ 'stack' ] = $ items ; $ this -> users -> saveUser ( $ user ) ; }
Persist the contents of the current stack to the session, as well as the database.
Persist the contents of the current stack to the session as well as the database .