protected function storeKeywordsToSession($keywords)
    {
        $currentLastSearches = $this->session->getLastSearches();
        $lastSearches = $currentLastSearches;
        $newLastSearchesCount = array_push($lastSearches, $keywords);

        while ($newLastSearchesCount > $this->configuration->getSearchLastSearchesLimit()) {
            array_shift($lastSearches);
            $newLastSearchesCount = count($lastSearches);
        }

        $this->session->setLastSearches($lastSearches);
    }
protected function storeKeywordsToSession($keywords)
    {
        $currentLastSearches = $this->session->getLastSearches();
        $lastSearches = $currentLastSearches;
        $newLastSearchesCount = array_push($lastSearches, $keywords);

        while ($newLastSearchesCount > $this->configuration->getSearchLastSearchesLimit()) {
            array_shift($lastSearches);
            $newLastSearchesCount = count($lastSearches);
        }

        $this->session->setLastSearches($lastSearches);
    }
protected function storeKeywordsToSession ( $ keywords ) { $ currentLastSearches = $ this -> session -> getLastSearches ( ) ; $ lastSearches = $ currentLastSearches ; $ newLastSearchesCount = array_push ( $ lastSearches , $ keywords ) ; while ( $ newLastSearchesCount > $ this -> configuration -> getSearchLastSearchesLimit ( ) ) { array_shift ( $ lastSearches ) ; $ newLastSearchesCount = count ( $ lastSearches ) ; } $ this -> session -> setLastSearches ( $ lastSearches ) ; }
Stores the keywords from the current query to the user's session.

@param string $keywords The current query's keywords
@return void
Stores the keywords from the current query to the user s session .