Kjetil Kjernsmo > AxKit-App-TABOO-0.52 > AxKit::App::TABOO::Data::Category

Download:
AxKit-App-TABOO-0.52.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.18   Source  

NAME ^

AxKit::App::TABOO::Data::Category - Category Data objects for TABOO

SYNOPSIS ^

  use AxKit::App::TABOO::Data::Category;
  $cat = AxKit::App::TABOO::Data::Category->new(@dbconnectargs);
  $cat->load(what => '*', limit => {catname => 'kitten'});

DESCRIPTION ^

It is often convenient to lump articles together in categories. People do that to organize subjects that interest them, find things that are related and so on. In the TABOO framework, the intention is to use several types of categories, but they are conceptually similar, and so, stored together.

METHODS ^

This class implements only one method, in addition to the constructor, the rest is inherited from AxKit::App::TABOO::Data.

new(@dbconnectargs)

The constructor. Nothing special.

load_name($catname)

This is an ad hoc method to retrieve the full name of a category, and it takes a $catname key to identify the category to retrieve. It will return a string with the name, but it will also populate the corresponding data fields of the object. You may therefore call write_xml on the object afterwards and have markup for the categoryname and name.

STORED DATA ^

The data is stored in named fields, and for certain uses, it is good to know them. If you want to subclass this class, you might want to use the same names, see the documentation of AxKit::APP::TABOO::Data for more about this. These are the names of the stored data of this class:

XML representation ^

The write_xml() method, implemented in the parent class, can be used to create an XML representation of the data in the object. The above names will be used as element names. The xmlelement(), xmlns() and xmlprefix() methods can be used to set the name of the root element, the namespace URI and namespace prefix respectively. Usually, it doesn't make sense to change the default namespace or prefix, that are

However, the root element may change depending on what kind of category we have. The default is category.

FORMALITIES ^

See AxKit::App::TABOO.

syntax highlighting: