XOOPS  2.6.0
CommentsCommentHandler Class Reference
Inheritance diagram for CommentsCommentHandler:
Inheritance graph

Public Member Functions

 __construct (Connection $db=null)
 
 deleteByItemId ($module_id, $item_id)
 
 deleteByModule ($module_id)
 
 getByItemId ($module_id, $item_id, $order=null, $status=null, $limit=null, $start=0)
 
 getCountByItemId ($module_id, $item_id, $status=null)
 
 getCountByModuleId ($module_id, $item_id=null)
 
 getThread ($comment_rootid, $comment_id, $status=null)
 
 getTopComments ($module_id, $item_id, $order, $status=null)
 
 updateByField (CommentsComment $comment, $field_name, $field_value)
 
- Public Member Functions inherited from Xoops\Core\Kernel\XoopsPersistableObjectHandler
 __call ($name, $args)
 
 cleanOrphan ($table_link= '', $field_link= '', $field_object= '')
 
 create ($isNew=true)
 
 delete (XoopsObject $object, $force=false)
 
 deleteAll (CriteriaElement $criteria, $force=true, $asObject=false)
 
 deleteByLink (CriteriaElement $criteria=null)
 
 get ($id=null, $fields=null)
 
 getAll (CriteriaElement $criteria=null, $fields=null, $asObject=true, $id_as_key=true)
 
 getByLink (CriteriaElement $criteria=null, $fields=null, $asObject=true, $field_link=null, $field_object=null)
 
 getCount (CriteriaElement $criteria=null)
 
 getCountByLink (CriteriaElement $criteria=null)
 
 getCounts (CriteriaElement $criteria=null)
 
 getCountsByLink (CriteriaElement $criteria=null)
 
 getIds (CriteriaElement $criteria=null)
 
 getList (CriteriaElement $criteria=null, $limit=0, $start=0)
 
 getObjects (CriteriaElement $criteria=null, $id_as_key=false, $as_object=true)
 
 insert (XoopsObject $object, $force=true)
 
 loadHandler ($name, $args=null)
 
 setHandler ($handler=null, $args=null, $path=null)
 
 synchronization ($table_link= '', $field_link= '', $field_object= '')
 
 updateAll ($fieldname, $fieldvalue, CriteriaElement $criteria, $force=false)
 
 updateByLink ($data, CriteriaElement $criteria=null)
 
- Public Member Functions inherited from Xoops\Core\Kernel\XoopsObjectHandler
 create ()
 
 delete (XoopsObject $object, $force=true)
 
 get ($int_id)
 
 insert (XoopsObject $object, $force=true)
 

Additional Inherited Members

- Public Attributes inherited from XoopsPersistableObjectHandler
 $db
 
- Public Attributes inherited from Xoops\Core\Kernel\XoopsPersistableObjectHandler
 $className
 
 $field_link
 
 $field_object
 
 $identifierName
 
 $keyName
 
 $keyName_link
 
 $table
 
 $table_link
 
- Public Attributes inherited from Xoops\Core\Kernel\XoopsObjectHandler
 $db2
 
- Protected Member Functions inherited from XoopsPersistableObjectHandler
 __construct (Connection $db=null, $table= '', $className= '', $keyName= '', $identifierName= '')
 
- Protected Member Functions inherited from Xoops\Core\Kernel\XoopsPersistableObjectHandler
 __construct (Connection $db=null, $table= '', $className= '', $keyName= '', $identifierName= '')
 
- Protected Member Functions inherited from Xoops\Core\Kernel\XoopsObjectHandler
 __construct (Connection $db=null)
 
- Protected Attributes inherited from Xoops\Core\Kernel\XoopsPersistableObjectHandler
 $handler
 

Detailed Description

Comment handler class.

Author
Kazumi Ono onoka.nosp@m.zu@x.nosp@m.oops..nosp@m.org

Definition at line 74 of file comment.php.

Constructor & Destructor Documentation

CommentsCommentHandler::__construct ( Connection  $db = null)

Constructor

Parameters
Connection | null$dbConnection

Definition at line 81 of file comment.php.

References XoopsPersistableObjectHandler\$db.

Member Function Documentation

CommentsCommentHandler::deleteByItemId (   $module_id,
  $item_id 
)
Parameters
int$module_id
int$item_id
Returns
bool

Definition at line 221 of file comment.php.

References $comments, $count, $i, $member_handler, $module_id, $user_id, getByItemId(), and Xoops\getInstance().

Here is the call graph for this function:

CommentsCommentHandler::deleteByModule (   $module_id)

Delete all comments for one whole module

Parameters
int$module_idID of the module
Returns
bool

Definition at line 211 of file comment.php.

References $module_id, and Xoops\Core\Kernel\XoopsPersistableObjectHandler\deleteAll().

Here is the call graph for this function:

CommentsCommentHandler::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 CommentsComment objects

Definition at line 98 of file comment.php.

References $criteria, $limit, $module_id, $start, $status, and Xoops\Core\Kernel\XoopsPersistableObjectHandler\getObjects().

Referenced by deleteByItemId().

Here is the call graph for this function:

Here is the caller graph for this function:

CommentsCommentHandler::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
integer Array of CommentsComment objects

Definition at line 124 of file comment.php.

References $criteria, $module_id, $status, and Xoops\Core\Kernel\XoopsPersistableObjectHandler\getCount().

Here is the call graph for this function:

CommentsCommentHandler::getCountByModuleId (   $module_id,
  $item_id = null 
)
Parameters
int$module_id
int | null$item_id
Returns
int

Definition at line 139 of file comment.php.

References $criteria, $module_id, and Xoops\Core\Kernel\XoopsPersistableObjectHandler\getCount().

Here is the call graph for this function:

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

Retrieve a whole thread

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

Definition at line 179 of file comment.php.

References $criteria, $status, and Xoops\Core\Kernel\XoopsPersistableObjectHandler\getObjects().

Here is the call graph for this function:

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

Get the top CommentsComments

Parameters
int$module_id
int$item_id
string$order
int$status
Returns
array Array of CommentsComment objects

Definition at line 158 of file comment.php.

References $criteria, $module_id, $status, and Xoops\Core\Kernel\XoopsPersistableObjectHandler\getObjects().

Here is the call graph for this function:

CommentsCommentHandler::updateByField ( CommentsComment  $comment,
  $field_name,
  $field_value 
)

Update

Parameters
CommentsComment$commentCommentsComment object
string$field_nameName of the field
mixed$field_valueValue to write
Returns
bool

Definition at line 198 of file comment.php.

References Xoops\Core\Kernel\XoopsPersistableObjectHandler\insert(), Xoops\Core\Kernel\XoopsObject\setVar(), and Xoops\Core\Kernel\XoopsObject\unsetNew().

Here is the call graph for this function:


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