SubscriptionManager implementation backed by an SQL table.
More...
|
| __construct (SessionConsistentConnectionManager $connectionManager) |
|
| subscribe ( $subscriber, array $entityIds) |
|
| unsubscribe ( $subscriber, array $entityIds) |
|
SubscriptionManager implementation backed by an SQL table.
- See also
- docs/usagetracking.wiki
- Copyright
- GPL-2.0-or-later
- Author
- Daniel Kinzler
◆ __construct()
Wikibase\Client\Usage\Sql\SqlSubscriptionManager::__construct |
( |
SessionConsistentConnectionManager |
$connectionManager | ) |
|
◆ deleteSubscriptions()
Wikibase\Client\Usage\Sql\SqlSubscriptionManager::deleteSubscriptions |
( |
IDatabase |
$db, |
|
|
|
$subscriber, |
|
|
array |
$subscriptions |
|
) |
| |
|
private |
Inserts a set of subscriptions.
- Parameters
-
IDatabase | $db | |
string | $subscriber | |
string[] | $subscriptions | |
◆ idsToString()
Wikibase\Client\Usage\Sql\SqlSubscriptionManager::idsToString |
( |
array |
$entityIds | ) |
|
|
private |
- Parameters
-
- Returns
- string[]
◆ insertSubscriptions()
Wikibase\Client\Usage\Sql\SqlSubscriptionManager::insertSubscriptions |
( |
IDatabase |
$db, |
|
|
|
$subscriber, |
|
|
array |
$subscriptions |
|
) |
| |
|
private |
Inserts a set of subscriptions.
- Parameters
-
IDatabase | $db | |
string | $subscriber | |
string[] | $subscriptions | |
◆ makeSubscriptionRows()
Wikibase\Client\Usage\Sql\SqlSubscriptionManager::makeSubscriptionRows |
( |
|
$subscriber, |
|
|
array |
$subscriptions |
|
) |
| |
|
private |
Returns a list of rows for insertion, using IDatabase's multi-row insert mechanism.
Each row is represented as [ $subscriber, $entityId ].
- Parameters
-
string | $subscriber | |
string[] | $subscriptions | |
- Returns
- array[] rows
◆ querySubscriptions()
Wikibase\Client\Usage\Sql\SqlSubscriptionManager::querySubscriptions |
( |
IDatabase |
$db, |
|
|
|
$subscriber, |
|
|
array |
$subscriptions |
|
) |
| |
|
private |
For a set of potential subscriptions, returns the existing subscriptions.
- Parameters
-
IDatabase | $db | |
string | $subscriber | |
string[] | $subscriptions | |
- Returns
- string[] Entity ID strings from $subscriptions which $subscriber is already subscribed to.
◆ subscribe()
Wikibase\Client\Usage\Sql\SqlSubscriptionManager::subscribe |
( |
|
$subscriber, |
|
|
array |
$entityIds |
|
) |
| |
◆ unsubscribe()
Wikibase\Client\Usage\Sql\SqlSubscriptionManager::unsubscribe |
( |
|
$subscriber, |
|
|
array |
$entityIds |
|
) |
| |
◆ $connectionManager
Wikibase\Client\Usage\Sql\SqlSubscriptionManager::$connectionManager |
|
private |
The documentation for this class was generated from the following file: