Core:Posts Class

From Habari Project

Revision as of 06:04, 20 December 2009 by michaeltwofish (Talk | contribs)
Jump to: navigation, search

Contents

Posts Object

Properties

get_param_cache

Array of parameters used to fetch the last Posts object.

Retrieving

get($paramarray = array())

by_status($status)

by_slug($slug = '')

Counting

count_total($status)

count_all()

count_by_author($user_id = '', $status)

count_by_tag($tag = '', $status)

Traversing

ascend()

descend()

Post Object

Properties

author

User object containing several informations on the Post object's author.

cached_content

We do not use this property yet, for cache please refer to the Cache class.

comments

Comments object containing comments for the Post object.

comment_count

Number of comments for the Post object.

comment_feed_link

URI to the Atom feed for the Post object.

editlink

URI to edit the Post object.

guid

Unique identifier with the format: tag:<hostname>,<yyyy>:<slug>/<time>.

id

Identification number of the Post object.

info

InfoObject Object for the Post object.

modified

HabariDateTime object of the time the Post object was last modified.
This field is updated only if the `minor edit` checkbox is unchecked in the publish form.
Also note that feeds are sorted using this property.

permalink

URI to view the Post object.

pubdate

HabariDateTime object of the time the Post object was published.

slug

Slugified title, all non-alphanumerical characters are replaced by a hyphen-minus (-). e.g: "Bienvenue à Québec" becomes "bienvenue-qu-bec"

statusname, status

Status as its textual representation (statusname) or integer value (status).

tags

Array where the keys are slugs and values their textual representation. e.g: Array( [foo-bar] => Foo Bar )

title

Textual representation of the Post's title.

typename, content_type

Type as its textual representation (typename) or integer value (content_type).

updated

HabariDateTime object of the time the Post object was last updated.
This field is updated anytime you edit a post.

Extending

...

This page describes a PHP class that is in the Habari software. For more comprehensive technical information visit the API Documentation.
Other Class Pages
Personal tools