protected function getLastSearchesFromSession($limit)
    {
        $lastSearches = $this->session->getLastSearches();
        $lastSearches = array_slice(array_reverse(array_unique($lastSearches)), 0, $limit);

        return $lastSearches;
    }
protected function getLastSearchesFromSession($limit)
    {
        $lastSearches = $this->session->getLastSearches();
        $lastSearches = array_slice(array_reverse(array_unique($lastSearches)), 0, $limit);

        return $lastSearches;
    }
protected function getLastSearchesFromSession ( $ limit ) { $ lastSearches = $ this -> session -> getLastSearches ( ) ; $ lastSearches = array_slice ( array_reverse ( array_unique ( $ lastSearches ) ) , 0 , $ limit ) ; return $ lastSearches ; }
Gets the last searched keywords from the user's session

@param int $limit
@return array An array containing the last searches of the current user
Gets the last searched keywords from the user s session