Simple implementation of PropertyStatisticsTable using MediaWikis database abstraction layer and a single table.
GNU GPL v2+
- Since
- 1.9
- Author
- Jeroen De Dauw < jeroe.nosp@m.nded.nosp@m.auw@g.nosp@m.mail.nosp@m..com >
-
Nischay Nahata
◆ __construct()
SMW\SQLStore\PropertyStatisticsStore::__construct |
( |
Database |
$connection | ) |
|
◆ addToUsageCount()
SMW\SQLStore\PropertyStatisticsStore::addToUsageCount |
( |
|
$pid, |
|
|
|
$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
◆ addToUsageCounts()
SMW\SQLStore\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
-
- Returns
- boolean Success indicator
◆ deleteAll()
SMW\SQLStore\PropertyStatisticsStore::deleteAll |
( |
| ) |
|
Deletes all rows in the table.
- Since
- 1.9
- Returns
- boolean Success indicator
◆ getUsageCount()
SMW\SQLStore\PropertyStatisticsStore::getUsageCount |
( |
|
$propertyId | ) |
|
Returns the usage count for a provided property id.
- Since
- 2.2
- Parameters
-
- Returns
- integer
◆ getUsageCounts()
SMW\SQLStore\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
-
- Returns
- array
◆ insertUsageCount()
SMW\SQLStore\PropertyStatisticsStore::insertUsageCount |
( |
|
$propertyId, |
|
|
|
$value |
|
) |
| |
Adds a new usage count.
- Since
- 1.9
- Parameters
-
integer | $propertyId | |
integer | $value | |
- Returns
- boolean Success indicator
- Exceptions
-
PropertyStatisticsInvalidArgumentException | |
◆ isCommandLineMode()
SMW\SQLStore\PropertyStatisticsStore::isCommandLineMode |
( |
|
$isCommandLineMode | ) |
|
◆ setUsageCount()
SMW\SQLStore\PropertyStatisticsStore::setUsageCount |
( |
|
$propertyId, |
|
|
|
$value |
|
) |
| |
Updates an existing usage count.
- Since
- 1.9
- Parameters
-
integer | $propertyId | |
integer | $value | |
- Returns
- boolean Success indicator
- Exceptions
-
PropertyStatisticsInvalidArgumentException | |
◆ waitOnTransactionIdle()
SMW\SQLStore\PropertyStatisticsStore::waitOnTransactionIdle |
( |
| ) |
|
The documentation for this class was generated from the following file:
- PropertyStatisticsStore.php