Core:Comments Class

From Habari Project

(Redirected from Classes/Comments)
Jump to: navigation, search

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 Comments 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

Comments Object

Properties

approved
Comments object containing approved comments from the source Comments object.
comments
Comments object containing comments from the source Comments object.
count
Number of comments contained by the Comments object.
moderated
Comments object containing moderated comments from the source Comments object.
pingbacks
Comments object containing pingbacks from the source Comments object.
trackbacks
Comments object containing trackbacks from the source Comments object.
unapproved
Comments object containing unapproved comments from the source Comments object.

Retrieving

get($paramarray = array())
by_email($email = '')
by_name($name = '')
by_ip($ip = '')
by_url($url = '')
by_post_id($post_id)
by_slug($slug = '')
by_status($status = 0)
only($what = 'approved')

Counting

count_total($status = Comment::STATUS_APPROVED, $type = Comment::COMMENT)
count_by_name($name = '', $status = Comment::STATUS_APPROVED)
count_by_email($email = '', $status = Comment::STATUS_APPROVED)
count_by_url($url = '', $status = Comment::STATUS_APPROVED)
count_by_ip($ip = '', $status = Comment::STATUS_APPROVED)
count_by_slug($slug = '', $status = Comment::STATUS_APPROVED)
count_by_id($id= 0, $status = Comment::STATUS_APPROVED)

Comment Object

Properties

content
Text of the comment.
date
HabariDateTime object of the time the Comment object was last submitted.
email
E-mail address of the comment author.
id
Identification number of the Comment object.
info
InfoObject Object for the Post object.
ip
IP of the comment author.
name
Name of the comment author.
post_id
Identification number of the Post object this comment is attached to.
post
Post object this comment is attached to.
statusname, status
Status as its textual representation (statusname) or integer value (status).
typename, type
Type as its textual representation (typename) or integer value (type).
url
URI to the comment author's website.
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