Elgg  Version master
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
Elgg\Comments\DataService Class Reference

Comments dataservice. More...

Public Member Functions

 setCommentsCount (int $guid, int $num)
 Set number of comments. More...
 
 getCommentsCount (\ElggEntity $entity)
 Get the number of comments for an entity. More...
 
 filterGuids (array $guids)
 Removes already counted comments from list of guids. More...
 

Static Public Member Functions

static instance ()
 Get a DataService instance. More...
 

Protected Attributes

 $counts = []
 

Detailed Description

Comments dataservice.

Since
4.1

Definition at line 11 of file DataService.php.

Member Function Documentation

Elgg\Comments\DataService::filterGuids ( array  $guids)

Removes already counted comments from list of guids.

Parameters
array$guidsarray of guids
Returns
array

Definition at line 58 of file DataService.php.

Elgg\Comments\DataService::getCommentsCount ( \ElggEntity  $entity)

Get the number of comments for an entity.

Parameters
\ElggEntity$entitythe entity to fetch for
Returns
int

Definition at line 37 of file DataService.php.

static Elgg\Comments\DataService::instance ( )
static

Get a DataService instance.

Returns

Definition at line 75 of file DataService.php.

Elgg\Comments\DataService::setCommentsCount ( int  $guid,
int  $num 
)

Set number of comments.

Parameters
int$guidfor guid
int$numnumber of comments
Returns
void

Definition at line 26 of file DataService.php.

Member Data Documentation

Elgg\Comments\DataService::$counts = []
protected

Definition at line 16 of file DataService.php.


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