Public Member Functions

ViewsDAO Class Reference

Class for keeping track of item views. More...

List of all members.

Public Member Functions

 deleteViews ($assocType, $assocId)
 getLastViewDate ($assocType, $assocId, $userId=null)
 moveViews ($assocType, $oldAssocId, $newAssocId)
 recordView ($assocType, $assocId, $userId)
 ViewsDAO ()

Detailed Description

Class for keeping track of item views.

Definition at line 17 of file ViewsDAO.inc.php.


Member Function Documentation

ViewsDAO.deleteViews ( assocType,
assocId 
)

Delete views of an assoc object.

Parameters:
$assocType integer One of the ASSOC_TYPE_* constants.
$assocId string

Definition at line 84 of file ViewsDAO.inc.php.

ViewsDAO.getLastViewDate ( assocType,
assocId,
userId = null 
)

Get the timestamp of the last view.

Parameters:
$assocType integer
$assocId string
$userId integer
Returns:
string|boolean Datetime of last view. False if no view found.

Definition at line 52 of file ViewsDAO.inc.php.

ViewsDAO.moveViews ( assocType,
oldAssocId,
newAssocId 
)

Move views from one assoc object to another.

Parameters:
$assocType integer One of the ASSOC_TYPE_* constants.
$oldAssocId string
$newAssocId string

Definition at line 72 of file ViewsDAO.inc.php.

ViewsDAO.recordView ( assocType,
assocId,
userId 
)

Mark an item as viewed.

Parameters:
$assocType integer The associated type for the item being marked.
$assocId string The id of the object being marked.
$userId integer The id of the user viewing the item.
Returns:
boolean

Definition at line 32 of file ViewsDAO.inc.php.

ViewsDAO.ViewsDAO (  ) 

Constructor

Definition at line 21 of file ViewsDAO.inc.php.


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