|
Babble::Document::Collection - Babble document collector class
|
Babble::Document::Collection - Babble document collector class
Babble::Document::Collection is a meta-class. One, that's sole purpose
is to collect Babble::Document objects, and group them together with a
little meta-info about them.
- author
-
The author of this collection
- subject
-
The subject of the collection.
- title
-
The title of the collection.
- id
-
A unique ID for the collection, usually a hyperlink to the source
homepage.
- link
-
A link to the source of this collection (for example, to an RSS feed).
- date
-
The creation date of this version of the collection.
- content
-
A brief description of the collection
- name
-
The name of the collection. Usually used for subscription lists in the
templates. This does not come from the feed, as the others. It must be
specified at object creation time. Defaults to author's value if
undefined, or title's, if author is undefined too.
- image
-
The image associated with the collection. It is stored as a HASH
reference, containing the following keys:
- url
-
The URL to the image. (Mandatory)
- title
-
Title of the image (to be used in ALT attributes or the like)
- link
-
An image link - where the image points to. (Mandatory)
- width
-
Width of the image.
- height
-
Height of the image.
new()
-
Creates a new, empty Babble::Document::Collection object. All the
properties mentioned above are recognised as paramaters.
To add documents to the collection, simply push them to
@{$collection->{documents}}.
- search($filters[, $params])
-
Given a list of filters (see Babble::Document::search for a
specification of filters) in an arrayref, returns all the documents
that match the specified criteria. If no matches are found, returns an
empty array.
all()
-
Return all entries (the lowest level entries) as an array.
sort($params)
-
Sort all the elements in an aggregation by date, and return the sorted
array of items.
Gergely Nagy, algernon@bonehunter.rulez.org
Bugs should be reported at http://bugs.bonehunter.rulez.org/babble.
Babble, Babble::Document
|
Babble::Document::Collection - Babble document collector class
|