class vB_Library_Reputation extends vB_Library

vB_Library_Reputation

Traits

Properties

static protected $instance from vB_Library
protected $nodevotescache
protected $notVoted

Methods

__sleep()

No description

__wakeup()

No description

__construct()

No description

static vB_PageCache
instance($class)

Returns singleton instance of self.

static 
getLibraryClassNameInternal($controller)

No description

static 
getContentInstance($contenttypeid)

No description

static 
clearCache()

No description

array
fetchReputationImageInfo(@param $userinfo)

Fetch reputation image info for displaying it in a node Ported from vB4's fetch_reputation_image() function

int|mixed|string
fetchReppower(mixed $userinfo)

Fetch Reputation Power of an user

cacheNodeVotes(array $nodeIds, $userid = 0)

Supplemental cache for node votes

int[]
fetchNodeVotes(array $nodeIds, int $userid = 0)

Check a list of nodes and see whether the user has voted them

Details

in vB_Trait_NoSerialize at line 15
__sleep()

in vB_Trait_NoSerialize at line 20
__wakeup()

in vB_Library at line 25
protected __construct()

in vB_Library at line 35
static vB_PageCache instance($class)

Returns singleton instance of self.

Parameters

$class

Return Value

vB_PageCache
  • Reference to singleton instance of the cache handler

in vB_Library at line 52
static protected getLibraryClassNameInternal($controller)

Parameters

$controller

in vB_Library at line 91
static getContentInstance($contenttypeid)

Parameters

$contenttypeid

in vB_Library at line 99
static clearCache()

at line 35
array fetchReputationImageInfo(@param $userinfo)

Fetch reputation image info for displaying it in a node Ported from vB4's fetch_reputation_image() function

Parameters

@param $userinfo mixed userinfo record from user api fetchuserinfo()

Return Value

array Contains 3 items: 1) type - image type. Possible values: balance, neg, highneg, pos, highpos, off 2) level - Reputation level's phrase name 3) bars - Number of image bars to be displayed. Maximum 10.

at line 119
int|mixed|string fetchReppower(mixed $userinfo)

Fetch Reputation Power of an user

Parameters

mixed $userinfo userinfo record from user api fetchuserinfo()

Return Value

int|mixed|string Reputation Power

at line 164
cacheNodeVotes(array $nodeIds, $userid = 0)

Supplemental cache for node votes

Parameters

array $nodeIds
$userid

at line 198
int[] fetchNodeVotes(array $nodeIds, int $userid = 0)

Check a list of nodes and see whether the user has voted them

Parameters

array $nodeIds A list of Nodes to be checked
int $userid User ID to be checked. If not there, currently logged-in user will be checked.

Return Value

int[] Node IDs that the user has voted. Keyed by nodeid.