| extends | XoopsObjectHandler | 
|---|
XOOPS comment handler class.
This class is responsible for providing data access mechanisms to the data source of XOOPS comment class objects.
| Methods | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 
					
	public
					
					
				 | create(bool $isNew = true): XoopsComment
		Create a {@link XoopsComment}
	 Create a {@link XoopsComment} Parameters
 Overrides | # | ||||||||||||
| 
					
	public
					
					
				 | get(int $id): XoopsComment|false
		Retrieve a {@link XoopsComment}
	 Retrieve a {@link XoopsComment} Parameters
 Returns{@link XoopsComment}, false on fail Overrides | # | ||||||||||||
| 
					
	public
					
					
				 | insert(XoopsObject|XoopsComment $comment): bool
		Write a comment to database
	 Write a comment to database Parameters
 Returnstrue on success, otherwise false Overrides | # | ||||||||||||
| 
					
	public
					
					
				 | delete(XoopsObject|XoopsComment $comment): bool
		Delete a {@link XoopsComment} from the database
	 Delete a {@link XoopsComment} from the database Parameters
 Returnstrue on success, otherwise false Overrides | # | ||||||||||||
| 
					
	public
					
					
				 | getObjects(CriteriaElement|CriteriaCompo $criteria = null, bool $id_as_key = false): array
		Get some {@link XoopsComment}s
	 Get some {@link XoopsComment}s Parameters
 ReturnsArray of {@link XoopsComment} objects | # | ||||||||||||
| 
					
	public
					
					
				 | getCount(CriteriaElement|CriteriaCompo $criteria = null): int
		Count Comments
	 Count Comments Parameters
 ReturnsCount | # | ||||||||||||
| 
					
	public
					
					
				 | deleteAll(CriteriaElement|CriteriaCompo $criteria = null): bool
		Delete multiple comments
	 Delete multiple comments Parameters
 | # | ||||||||||||
| 
					
	public
					
					
				 | getList(CriteriaElement $criteria = null): array
		Get a list of comments
	 Get a list of comments Parameters
 ReturnsArray of raw database records | # | ||||||||||||
| 
					
	public
					
					
				 | getByItemId(
	int $module_id,
	int $item_id,
	string $order = null,
	int $status = null,
	int $limit = null,
	int $start = 0,
): array
		Retrieves comments for an item
	 Retrieves comments for an item Parameters
 ReturnsArray of {@link XoopsComment} objects | # | ||||||||||||
| 
					
	public
					
					
				 | getCountByItemId(int $module_id, int $item_id, int $status = null): array
		Gets total number of comments for an item
	 Gets total number of comments for an item Parameters
 ReturnsArray of {@link XoopsComment} objects | # | ||||||||||||
| 
					
	public
					
					
				 | getTopComments(int $module_id, int $item_id, string $order, int $status = null): array
		Get the top {@link XoopsComment}s
	 Get the top {@link XoopsComment}s ReturnsArray of {@link XoopsComment} objects | # | ||||||||||||
| 
					
	public
					
					
				 | getThread(int $comment_rootid, int $comment_id, int $status = null): array
		Retrieve a whole thread
	 Retrieve a whole thread ReturnsArray of {@link XoopsComment} objects | # | ||||||||||||
| 
					
	public
					
					
				 | updateByField(XoopsComment $comment, string $field_name, mixed $field_value): bool
		Update
	 Update Parameters
 | # | ||||||||||||
| 
					
	public
					
					
				 | deleteByModule(int $module_id): bool
		Delete all comments for one whole module
	 Delete all comments for one whole module Parameters
 | # | ||||||||||||
| Methods inherited from XoopsObjectHandler | 
|---|
| __construct(), XoopsObjectHandler(),  | 
| Properties inherited from XoopsObjectHandler | 
|---|
| $db |