XOOPS 2.5.6  Final
 All Classes Namespaces Files Functions Variables Pages
XoopsCommentHandler Class Reference
Inheritance diagram for XoopsCommentHandler:
Inheritance graph

Public Member Functions

create ($isNew=true)
 
 delete (&$comment)
 
 deleteAll ($criteria=null)
 
 deleteByModule ($module_id)
 
get ($id)
 
 getByItemId ($module_id, $item_id, $order=null, $status=null, $limit=null, $start=0)
 
 getCount ($criteria=null)
 
 getCountByItemId ($module_id, $item_id, $status=null)
 
 getList ($criteria=null)
 
 getObjects ($criteria=null, $id_as_key=false)
 
 getThread ($comment_rootid, $comment_id, $status=null)
 
 getTopComments ($module_id, $item_id, $order, $status=null)
 
 insert (&$comment)
 
 updateByField (&$comment, $field_name, $field_value)
 
- Public Member Functions inherited from XoopsObjectHandler
create ()
 
 delete (&$object)
 
get ($int_id)
 
 insert (&$object)
 
 XoopsObjectHandler (&$db)
 

Additional Inherited Members

- Public Attributes inherited from XoopsObjectHandler
 $db
 

Detailed Description

Definition at line 280 of file comment.php.

Member Function Documentation

& XoopsCommentHandler::create (   $isNew = true)

Create a XoopsComment

Parameters
bool$isNewFlag the object as "new"?
Returns
object

Definition at line 289 of file comment.php.

References $comment.

XoopsCommentHandler::delete ( $comment)

Delete a XoopsComment from the database

Parameters
object&$comment
Returns
bool

: Change to if (!(class_exists($this->className) && $obj instanceof $this->className)) when going fully PHP5

Definition at line 372 of file comment.php.

References $comment, $result, and $sql.

XoopsCommentHandler::deleteAll (   $criteria = null)

Delete multiple comments

Parameters
object$criteriaCriteriaElement
Returns
bool

Definition at line 451 of file comment.php.

References $criteria, $result, and $sql.

Referenced by deleteByModule().

Here is the caller graph for this function:

XoopsCommentHandler::deleteByModule (   $module_id)

Delete all comments for one whole module

Parameters
int$module_idID of the module
Returns
bool

Definition at line 591 of file comment.php.

References $module_id, and deleteAll().

Here is the call graph for this function:

& XoopsCommentHandler::get (   $id)

Retrieve a XoopsComment

Parameters
int$idID
Returns
object XoopsComment, FALSE on fail

Definition at line 305 of file comment.php.

References $comment, $result, and $sql.

XoopsCommentHandler::getByItemId (   $module_id,
  $item_id,
  $order = null,
  $status = null,
  $limit = null,
  $start = 0 
)

Retrieves comments for an item

Parameters
int$module_idModule ID
int$item_idItem ID
string$orderSort order
int$statusStatus of the comment
int$limitMax num of comments to retrieve
int$startStart offset
Returns
array Array of XoopsComment objects

Definition at line 492 of file comment.php.

References $criteria, $limit, $module_id, $start, $status, and getObjects().

Here is the call graph for this function:

XoopsCommentHandler::getCount (   $criteria = null)

Count Comments

Parameters
object$criteriaCriteriaElement
Returns
int Count

Definition at line 431 of file comment.php.

References $criteria, $result, and $sql.

Referenced by getCountByItemId().

Here is the caller graph for this function:

XoopsCommentHandler::getCountByItemId (   $module_id,
  $item_id,
  $status = null 
)

Gets total number of comments for an item

Parameters
int$module_idModule ID
int$item_idItem ID
int$statusStatus of the comment
Returns
array Array of XoopsComment objects

Definition at line 518 of file comment.php.

References $criteria, $module_id, $status, and getCount().

Here is the call graph for this function:

XoopsCommentHandler::getList (   $criteria = null)

Get a list of comments

Parameters
object$criteriaCriteriaElement
Returns
array Array of raw database records

Definition at line 470 of file comment.php.

References $comments, $criteria, $i, $ret, and getObjects().

Here is the call graph for this function:

XoopsCommentHandler::getObjects (   $criteria = null,
  $id_as_key = false 
)

Get some XoopsComments

Parameters
object$criteria
bool$id_as_keyUse IDs as keys into the array?
Returns
array Array of XoopsComment objects

Definition at line 395 of file comment.php.

References $comment, $criteria, $limit, $result, $ret, $sql, and $start.

Referenced by getByItemId(), getList(), getThread(), and getTopComments().

Here is the caller graph for this function:

XoopsCommentHandler::getThread (   $comment_rootid,
  $comment_id,
  $status = null 
)

Retrieve a whole thread

Parameters
int$comment_rootid
int$comment_id
int$status
Returns
array Array of XoopsComment objects

Definition at line 559 of file comment.php.

References $criteria, $status, and getObjects().

Here is the call graph for this function:

XoopsCommentHandler::getTopComments (   $module_id,
  $item_id,
  $order,
  $status = null 
)

Get the top XoopsComments

Parameters
int$module_id
int$item_id
strint$order
int$status
Returns
array Array of XoopsComment objects

Definition at line 538 of file comment.php.

References $criteria, $module_id, $status, and getObjects().

Here is the call graph for this function:

XoopsCommentHandler::insert ( $comment)

Write a comment to database

Parameters
object&$comment
Returns
bool

: Change to if (!(class_exists($this->className) && $obj instanceof $this->className)) when going fully PHP5

Definition at line 330 of file comment.php.

References $com_email, $com_icon, $com_id, $com_itemid, $com_modid, $com_pid, $com_rootid, $com_status, $com_text, $com_title, $com_url, $com_user, $comment, $dobr, $dohtml, $doimage, $dosmiley, $doxcode, $result, and $sql.

Referenced by updateByField().

Here is the caller graph for this function:

XoopsCommentHandler::updateByField ( $comment,
  $field_name,
  $field_value 
)

Update

Parameters
object&$commentXoopsComment object
string$field_nameName of the field
mixed$field_valueValue to write
Returns
bool

Definition at line 578 of file comment.php.

References $comment, and insert().

Here is the call graph for this function:


The documentation for this class was generated from the following file: