Public Member Functions |
| | __construct () |
| | addRate ($type, $type_id, $rating, $message='', $member_id=0, $app='') |
| | formatLikeNameString (array $data, array $item) |
| | getCurrentMemberRating ($data) |
| | getCurrentRating ($data) |
| | getDataByRelationshipId ($data) |
| | getLikeData ($data) |
| | getLikeFormatted ($item) |
| | getLikeRawData ($data) |
| | getReputation ($points) |
| | getTotalRatingJoin ($type, $type_id, $app='') |
| | getUserHasRatedJoin ($type, $type_id, $app='') |
| | isLikeMode () |
| | updateCache ($app, $type, $type_id) |
Data Fields |
|
| $error_message |
|
| $rep_system_on |
Constructor & Destructor Documentation
CONSTRUCTOR
public
- Returns:
- void
Member Function Documentation
| addRate |
( |
$ |
type, |
|
|
$ |
type_id, |
|
|
$ |
rating, |
|
|
$ |
message = '', |
|
|
$ |
member_id = 0, |
|
|
$ |
app = '' |
|
) |
| |
Adds a rating to the index and updates caches
public
- Parameters:
-
| string | $type | Type of content, ex; Post |
| integer | $type_id | ID of the type, ex: pid |
| integer | $rating | Either 1 or -1 |
| string | $message | Message associated with this rating |
| integer | $member_id | Id of the owner of the content being rated |
| string | [$app] App for this content, by default the current application |
- Returns:
- bool
Formats the Bob, Bill, Joe and 2038 Others Hate You
- Parameters:
-
| array | $data | |
| array | $item | Data (id, type, app) |
- Returns:
- string
Has this member rated this item?
- Parameters:
-
| array | $data | (app, id, type, memberId ) |
- Returns:
- boolean
Has this member rated this item?
- Parameters:
-
| array | $data | (app, id, type, memberId ) |
- Returns:
- int
Get data based on a relationship ID
- Parameters:
-
| array | $data | (id, type, app) |
- Returns:
- mixed Array of like data OR null
Gets 'like' data for this item
- Parameters:
-
- Returns:
- array
Get 'like' formatted for this item
- Parameters:
-
| array | Data array ( id, type, app ) |
Get the like data from the DB (no cache)
- Parameters:
-
| array | $data | Like data ( id, type, app ) |
- Returns:
- array Cache data
Returns an array of reputation information based on the points passed in
public
- Parameters:
-
| integer | $points | Number of points to base the repuation information on |
- Returns:
- array 'text' and 'image'
Retuns an array for use in a join statement
public
- Parameters:
-
| string | $type | Type of content, ex; Post |
| integer | $type_id | ID of the type, ex: pid |
| string | [$app] App for this content, by default the current application |
- Returns:
- array
Retuns an array for use in a join statement
public
- Parameters:
-
| string | $type | Type of content, ex; Post |
| integer | $type_id | ID of the type, ex: pid |
| string | [$app] App for this content, by default the current application |
- Returns:
- array
Handles updating and creating new caches
private
- Parameters:
-
| string | $app | App for this content |
| string | $type | Type of content, ex; Post |
| integer | $type_id | ID of the type, ex: pid |
- Returns:
- void
The documentation for this class was generated from the following file:
- admin/sources/classes/class_reputation_cache.php