SIOC::Post - SIOC Post class


SIOC documentation  | view source Contained in the SIOC distribution.

Index


NAME

Top

SIOC::Post - SIOC Post class

VERSION

Top

This documentation refers to SIOC::Post version 1.0.0.

SYNOPSIS

Top

   use SIOC::Post;

DESCRIPTION

Top

A Post is an article or message posted by a User to a Forum. A series of Posts may be threaded if they share a common subject and are connected by reply or by date relationships. Posts will have content and may also have attached files, which can be edited or deleted by the Moderator of the Forum that contains the Post.

The SIOC Types Ontology Module describes some additional, more specific subclasses of SIOC::Post.

Class attributes

content

The content of the Post in plain text format.

This attribute is required and must be set in the creation of a class instance with new().

encoded_content

Used to describe the encoded content of a Post, contained in CDATA areas.

This attribute is required and must be set in the creation of a class instance with new().

attachments

The URIs of files attached to a Post.

Related Posts for this Post, perhaps determined implicitly from topics or references.

siblings

A Post may have a sibling or a twin that exists in a different Forum, but the siblings may differ in some small way (for example, language, category, etc.). The sibling of this Post should be self-describing (that is, it should contain all available information).

note

A note associated with this Post, for example, if it has been edited by a User.

reply_count

The number of replies that this Post has. Useful for when the reply structure is absent.

SUBROUTINES/METHODS

Top

content([$content])

Accessor for the attribute of the same name. Call without argument to read the current value of the attribute; sets attribute when called with new value as argument.

encoded_content([$content])

Accessor for the attribute of the same name. Call without argument to read the current value of the attribute; sets attribute when called with new value as argument.

set_attachment($name => $data)

Sets a key/value pair in the corresponding hash attribute.

get_attachment($name)

Queries a key/value pair in the corresponding hash attribute.

add_sibling($item)

Adds a new value to the corresponding array attribute.

note([$note])

Accessor for the attribute of the same name. Call without argument to read the current value of the attribute; sets attribute when called with new value as argument.

reply_count([$num])

Accessor for the attribute of the same name. Call without argument to read the current value of the attribute; sets attribute when called with new value as argument.

DIAGNOSTICS

Top

For diagnostics information, see the SIOC base class.

CONFIGURATION AND ENVIRONMENT

Top

This module doesn't need configuration.

DEPENDENCIES

Top

This module depends on the following modules:

INCOMPATIBILITIES

Top

There are no known incompatibilities.

BUGS AND LIMITATIONS

Top

There are no known bugs in this module.

Please report problems via the bug tracking system on the perl-SIOC project website: http://developer.berlios.de/projects/perl-sioc/.

Patches are welcome.

AUTHOR

Top

Jochen Lillich <geewiz@cpan.org>

LICENSE AND COPYRIGHT

Top


SIOC documentation  | view source Contained in the SIOC distribution.