Changeset 68 in bookmarks for trunk/Bookmarks.pm


Ignore:
Timestamp:
02/08/14 18:23:22 (10 years ago)
Author:
peter
Message:
  • added a "view" class, BookmarksList
  • moved the code to render the various formats of the list of bookmarks from and if statement in BookmarkController::list() to a set of as_$format() methods in BookmarksList
  • moved the _get_list_links() method from BookmarkController to BookmarksList
  • Bookmarks::get_bookmarks() returns a BookmarksList instead of an array
  • the ?format parameter accepts "atom" to render arbitrary sets of results as Atom feeds; the BookmarkController::feed() method just calls as_atom() on a BookmarksList search result object
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Bookmarks.pm

    r66 r68  
    55use URI; 
    66use Bookmark; 
     7use BookmarksList; 
    78 
    89has dbh      => ( is => 'rw' ); 
     
    116117        }); 
    117118    } 
    118     return @resources; 
     119    return BookmarksList->new({ 
     120        bookmarks => $self, 
     121        tags      => $tags, 
     122        query     => $query, 
     123        limit     => $limit, 
     124        offset    => $offset, 
     125        results   => \@resources, 
     126    }); 
    119127} 
    120128 
Note: See TracChangeset for help on using the changeset viewer.