Semantic MediaWiki and related extensions
Public Member Functions | List of all members
SMW\SQLStore\PropertyStatisticsTable Class Reference
Collaboration diagram for SMW\SQLStore\PropertyStatisticsTable:
Collaboration graph
[legend]

Public Member Functions

 __construct (Database $connection, $table)
 
 setLogger (LoggerInterface $logger)
 
 isCommandLineMode ($isCommandLineMode)
 
 waitOnTransactionIdle ()
 
 getStatisticsTable ()
 
 addToUsageCount ($propertyId, $value)
 
 addToUsageCounts (array $additions)
 
 setUsageCount ($propertyId, $value)
 
 insertUsageCount ($propertyId, $value)
 
 getUsageCount ($propertyId)
 
 getUsageCounts (array $propertyIds)
 
 deleteAll ()
 

Detailed Description

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

Constructor & Destructor Documentation

SMW\SQLStore\PropertyStatisticsTable::__construct ( Database  $connection,
  $table 
)
Since
1.9
Parameters
Database$connection
string$table

Member Function Documentation

SMW\SQLStore\PropertyStatisticsTable::addToUsageCount (   $propertyId,
  $value 
)
See also
PropertyStatisticsStore::addToUsageCount
Since
1.9
Parameters
integer$propertyId
integer$value
Returns
boolean Success indicator
Exceptions
PropertyStatisticsInvalidArgumentException

Implements SMW\Store\PropertyStatisticsStore.

SMW\SQLStore\PropertyStatisticsTable::addToUsageCounts ( array  $additions)
See also
PropertyStatisticsStore::addToUsageCounts
Since
1.9
Parameters
array$additions
Returns
boolean Success indicator

Implements SMW\Store\PropertyStatisticsStore.

SMW\SQLStore\PropertyStatisticsTable::deleteAll ( )
See also
PropertyStatisticsStore::deleteAll
Since
1.9
Returns
boolean Success indicator

Implements SMW\Store\PropertyStatisticsStore.

SMW\SQLStore\PropertyStatisticsTable::getStatisticsTable ( )
Since
2.2
Returns
string
SMW\SQLStore\PropertyStatisticsTable::getUsageCount (   $propertyId)
Since
2.2
Parameters
integer$propertyId
Returns
integer

Implements SMW\Store\PropertyStatisticsStore.

SMW\SQLStore\PropertyStatisticsTable::getUsageCounts ( array  $propertyIds)
See also
PropertyStatisticsStore::getUsageCounts
Since
1.9
Parameters
array$propertyIds
Returns
array

Implements SMW\Store\PropertyStatisticsStore.

SMW\SQLStore\PropertyStatisticsTable::insertUsageCount (   $propertyId,
  $value 
)
See also
PropertyStatisticsStore::insertUsageCount
Since
1.9
Parameters
integer$propertyId
integer$value
Returns
boolean Success indicator
Exceptions
PropertyStatisticsInvalidArgumentException

Implements SMW\Store\PropertyStatisticsStore.

SMW\SQLStore\PropertyStatisticsTable::isCommandLineMode (   $isCommandLineMode)
See also
https://www.mediawiki.org/wiki/Manual:$wgCommandLineMode Indicates whether MW is running in command-line mode or not.
Since
2.5
Parameters
boolean$isCommandLineMode
SMW\SQLStore\PropertyStatisticsTable::setLogger ( LoggerInterface  $logger)
See also
LoggerAwareInterface::setLogger
Since
2.5
Parameters
LoggerInterface$logger
SMW\SQLStore\PropertyStatisticsTable::setUsageCount (   $propertyId,
  $value 
)
See also
PropertyStatisticsStore::setUsageCount
Since
1.9
Parameters
integer$propertyId
integer$value
Returns
boolean Success indicator
Exceptions
PropertyStatisticsInvalidArgumentException

Implements SMW\Store\PropertyStatisticsStore.

SMW\SQLStore\PropertyStatisticsTable::waitOnTransactionIdle ( )
Since
2.5

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