Inheritance diagram for Comment:
Collaboration diagram for Comment:Public Member Functions | |
| __construct ($paramarray=array()) | |
| insert () | |
| update () | |
| delete () | |
| __get ($name) | |
| __set ($name, $value) | |
| content_type () | |
| get_access ($user=null) | |
| css_class ($append=array()) | |
Static Public Member Functions | |
| static | default_fields () |
| static | get ($id=0) |
| static | create ($paramarray) |
| static | list_comment_types ($refresh=false) |
| static | list_comment_statuses ($refresh=false) |
| static | status_action ($status) |
| static | status ($name) |
| static | status_name ($status) |
| static | type ($name) |
| static | type_name ($type) |
Public Attributes | |
| const | STATUS_UNAPPROVED = 0 |
| const | STATUS_APPROVED = 1 |
| const | STATUS_SPAM = 2 |
| const | STATUS_DELETED = 3 |
| const | COMMENT = 0 |
| const | PINGBACK = 1 |
| const | TRACKBACK = 2 |
Static Public Attributes | |
| static | $comment_status_list = array() |
| static | $comment_type_list = array() |
| static | $comment_status_actions = array() |
Habari CommentRecord Class
Includes an instance of the CommentInfo class; for holding inforecords about the comment If the Comment object describes an existing user; use the internal info object to get, set, unset and test for existence (isset) of info records $this->info = new CommentInfo ( 1 ); // Info records of comment with id = 1 $this->info->browser_ua= "Netscape 2.0"; // set info record with name "browser_ua" to value "Netscape 2.0" $info_value= $this->info->browser_ua; // get value of info record with name "browser_ua" into variable $info_value if ( isset ($this->info->browser_ua) ) // test for existence of "browser_ua" unset ( $this->info->browser_ua ); // delete "browser_ua" info record
Definition at line 22 of file comment.php.
| Comment::__construct | ( | $ | paramarray = array() |
) |
constructor __construct Constructor for the Post class.
| array | an associative array of initial Post field values. |
Definition at line 69 of file comment.php.
| Comment::__get | ( | $ | name | ) |
function __get Overrides QueryRecord __get to implement custom object properties
| string | Name of property to return |
Definition at line 187 of file comment.php.
| Comment::__set | ( | $ | name, | |
| $ | value | |||
| ) |
function __set Overrides QueryRecord __set to implement custom object properties
| string | Name of property to return |
Definition at line 235 of file comment.php.
| Comment::content_type | ( | ) |
Return the content type of this object
Implements IsContent.
Definition at line 477 of file comment.php.
| static Comment::create | ( | $ | paramarray | ) | [static] |
static function create Creates a comment and saves it
| array | An associative array of comment fields $return Comment The comment object that was created |
Definition at line 104 of file comment.php.
| Comment::css_class | ( | $ | append = array() |
) |
Returns a list of CSS classes for the comment
| string|array | $append Additional classes that should be added to the ones generated |
Definition at line 550 of file comment.php.
| static Comment::default_fields | ( | ) | [static] |
static function default_fields Returns the defined database columns for a comment
Definition at line 48 of file comment.php.
Referenced by Comments::get().
| Comment::delete | ( | ) |
function delete Deletes this comment
Definition at line 164 of file comment.php.
| static Comment::get | ( | $ | id = 0 |
) | [static] |
static function get Returns a single comment, by ID
$post = Post::get( 10 );
| int | An ID |
Definition at line 90 of file comment.php.
Referenced by __set(), and AdminCommentsHandler::get_comment().
| Comment::get_access | ( | $ | user = null |
) |
Returns an access Bitmask for the given user on this comment. Read access is determined by the associated post. Update/delete is determined by the comment management tokens.
| User | $user The user mask to fetch |
Definition at line 488 of file comment.php.
| Comment::insert | ( | ) |
function insert Saves a new comment to the posts table
Definition at line 115 of file comment.php.
| static Comment::list_comment_statuses | ( | $ | refresh = false |
) | [static] |
returns an associative array of comment statuses
| bool | whether to force a refresh of the cached values |
Definition at line 357 of file comment.php.
Referenced by AdminCommentsHandler::form_comment(), AdminCommentsHandler::get_comment(), AdminCommentsHandler::post_comments(), Comments::search_to_get(), status(), status_action(), and status_name().
| static Comment::list_comment_types | ( | $ | refresh = false |
) | [static] |
returns an associative array of comment types
| bool | whether to force a refresh of the cached values |
Definition at line 339 of file comment.php.
Referenced by AdminCommentsHandler::post_comments(), Comments::search_to_get(), type(), and type_name().
| static Comment::status | ( | $ | name | ) | [static] |
returns the integer value of the specified comment status, or false
| mixed | a comment status name or value |
Definition at line 404 of file comment.php.
Referenced by __get(), Comments::delete_by_status(), Comments::get(), and AtomHandler::get_comments().
| static Comment::status_action | ( | $ | status | ) | [static] |
returns the action name of the comment status
| mixed | a comment status value, or name |
Definition at line 377 of file comment.php.
| static Comment::status_name | ( | $ | status | ) | [static] |
returns the friendly name of a comment status, or null
| mixed | a comment status value, or name |
Definition at line 422 of file comment.php.
Referenced by __get(), AdminCommentsHandler::form_comment(), and AdminCommentsHandler::get_comment().
| static Comment::type | ( | $ | name | ) | [static] |
returns the integer value of the specified comment type, or false
| mixed | a comment type name or number |
Definition at line 440 of file comment.php.
Referenced by __get(), content_type(), and Comments::get().
| static Comment::type_name | ( | $ | type | ) | [static] |
returns the friendly name of a comment type, or null
| mixed | a comment type number, or name |
Definition at line 458 of file comment.php.
Referenced by __get(), and content_type().
| Comment::update | ( | ) |
function update Updates an existing comment in the posts table
Definition at line 140 of file comment.php.
1.7.1