Core:Posts Class

From Habari Project

(Difference between revisions)
Jump to: navigation, search
m (Link to moved core pages)
(Mark for deletion)
 
Line 1: Line 1:
-
{{Stub}}
+
{{delete|The wiki is not the place for API documentation. Anything useful on this page should either be moved to a sensible page like [[Dev:Retrieving Posts]] or included in the code as docblocks.}}
 +
 
<div style="clear: {{{clear|right}}}; margin-bottom: .5em; float: right; padding: .5em 0 .8em 1.4em; background: none; width: {{{width|{{{1|auto}}}}}};" {{#if:{{{limit|}}}|class="toclimit-{{{limit|}}}"}}>__TOC__</div>
<div style="clear: {{{clear|right}}}; margin-bottom: .5em; float: right; padding: .5em 0 .8em 1.4em; background: none; width: {{{width|{{{1|auto}}}}}};" {{#if:{{{limit|}}}|class="toclimit-{{{limit|}}}"}}>__TOC__</div>
== Posts Object ==
== Posts Object ==

Latest revision as of 02:24, 6 November 2011

This page or image is a candidate for deletion. The given reason is: The wiki is not the place for API documentation. Anything useful on this page should either be moved to a sensible page like Dev:Retrieving Posts or included in the code as docblocks.

This notice should remain for a minimum of 1 week after it was placed on the page. If discussion is still ongoing, it should remain until a consensus is reached, after which the page will either be deleted or this notice removed.

If you disagree with its deletion, please discuss your reasons on this page or on its associated talk page, as applicable.

Remember to check if anything links here and the page history before deleting.


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