Semantic MediaWiki and related extensions
Public Member Functions | List of all members
SMW\Store\PropertyStatisticsStore Interface Reference

Public Member Functions

 addToUsageCount ($propertyId, $value)
 
 addToUsageCounts (array $additions)
 
 setUsageCount ($propertyId, $value)
 
 insertUsageCount ($propertyId, $value)
 
 getUsageCount ($propertyId)
 
 getUsageCounts (array $propertyIds)
 
 deleteAll ()
 

Detailed Description

Interface for stores of property statistics.

Since
1.9

GNU GPL v2 or later

Author
Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >

Member Function Documentation

SMW\Store\PropertyStatisticsStore::addToUsageCount (   $propertyId,
  $value 
)

Change the usage count for the property of the given ID by the given value. The method does nothing if the count is 0.

Since
1.9
Parameters
integer$propertyId
integer$value
Returns
boolean Success indicator

Implemented in SMW\SQLStore\PropertyStatisticsTable.

SMW\Store\PropertyStatisticsStore::addToUsageCounts ( array  $additions)

Increase the usage counts of multiple properties.

The $additions parameter should be an array with integer keys that are property ids, and associated integer values that are the amount the usage count should be increased.

Since
1.9
Parameters
array$additions
Returns
boolean Success indicator

Implemented in SMW\SQLStore\PropertyStatisticsTable.

SMW\Store\PropertyStatisticsStore::deleteAll ( )

Deletes all rows in the table.

Since
1.9
Returns
boolean Success indicator

Implemented in SMW\SQLStore\PropertyStatisticsTable.

SMW\Store\PropertyStatisticsStore::getUsageCount (   $propertyId)

Returns the usage count for a provided property id.

Since
2.2
Parameters
integer$propertyId
Returns
integer

Implemented in SMW\SQLStore\PropertyStatisticsTable.

SMW\Store\PropertyStatisticsStore::getUsageCounts ( array  $propertyIds)

Returns the usage counts of the provided properties.

The returned array contains integer keys which are property ids, with the associated values being their usage count (also integers).

Properties for which no usage count is found will not have an entry in the result array.

Since
1.9
Parameters
array$propertyIds
Returns
array

Implemented in SMW\SQLStore\PropertyStatisticsTable.

SMW\Store\PropertyStatisticsStore::insertUsageCount (   $propertyId,
  $value 
)

Adds a new usage count.

Since
1.9
Parameters
integer$propertyId
integer$value
Returns
boolean Success indicator

Implemented in SMW\SQLStore\PropertyStatisticsTable.

SMW\Store\PropertyStatisticsStore::setUsageCount (   $propertyId,
  $value 
)

Updates an existing usage count.

Since
1.9
Parameters
integer$propertyId
integer$value
Returns
boolean Success indicator

Implemented in SMW\SQLStore\PropertyStatisticsTable.


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