AxKit::App::TABOO::Data::Plurals::Articles - Data objects to handle multiple Articles in TABOO
Often, you want to retrieve many different articles from the data store, for example all belonging to a certain category. This is a typical situation where this class shoule be used.
new(@dbconnectargs)
The constructor. Nothing special.
load(what => fields, limit => {key => value, [...]}, orderby => fields, entries => number)
This load method can be used to retrieve a number of entries from a data store. It can use named parameters, but has a unique other possibility too, see below. In named parameters mode, the first what is used to determine which fields to retrieve. It is a string consisting of a commaseparated list of fields, as specified in the data store. The limit argument is to be used to determine which records to retrieve, these will be combined by logical AND. You may also supply a orderby argument, which is an expression used to determine the order of entries returned. Usually, it would be a simple string with the field name to use, e.g. 'timestamp', but you might want to append the keyword "DESC" to it for descending order. Finally, you may supply a entries argument, which is the maximum number of entries to retrieve.
what
limit
orderby
'timestamp'
DESC
entries
The other possible use to first use the incat method, see below, and then you may call this method on the object without any parameters, and the corresponding articles will be loaded.
incat
It will retrieve the data, and then call populate() for each of the records retrieved to ensure that the plural data objects actually consists of an array of AxKit::App::TABOO::Data::Articles. But it calls the internal _load()-method to do the hard work (and that's in the parent class).
populate()
_load()
If there is no data that corresponds to the given arguments, this method will return undef.
undef
addcatinfo
adduserinfo
addformatinfo
These three methods are implemented in a plurals context, and can be called on a plurals object just like a singular object. Each entry will have their data structure extended with user, category and format information.
incat(@catnames)
Takes as arguments an array containing array names, and will return the number of articles that has been classified into all those categories. It will also, internally, store which articles that was, so that you may call the load method on the object afterwards without any further arguments to load the articles.
load
Not anything particular at the moment...
See AxKit::App::TABOO.
To install AxKit::App::TABOO, copy and paste the appropriate command in to your terminal.
cpanm
cpanm AxKit::App::TABOO
CPAN shell
perl -MCPAN -e shell install AxKit::App::TABOO
For more information on module installation, please visit the detailed CPAN module installation guide.