SubscriptionManager implementation backed by an SQL table.
More...
|
| __construct (SessionConsistentConnectionManager $connectionManager) |
|
| subscribe ( $subscriber, array $entityIds) |
|
| unsubscribe ( $subscriber, array $entityIds) |
|
|
| idsToString (array $entityIds) |
|
| querySubscriptions (IDatabase $db, $subscriber, array $subscriptions) |
| For a set of potential subscriptions, returns the existing subscriptions.
|
|
| insertSubscriptions (IDatabase $db, $subscriber, array $subscriptions) |
| Inserts a set of subscriptions.
|
|
| deleteSubscriptions (IDatabase $db, $subscriber, array $subscriptions) |
| Inserts a set of subscriptions.
|
|
| makeSubscriptionRows ( $subscriber, array $subscriptions) |
| Returns a list of rows for insertion, using IDatabase's multi-row insert mechanism.
|
|
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 |
|
) |
| |
- See also
- SubscriptionManager::subscribe
- Parameters
-
string | $subscriber | |
EntityId[] | $entityIds | |
- Exceptions
-
InvalidArgumentException | |
UsageTrackerException | |
Exception | |
Implements Wikibase\Client\Usage\SubscriptionManager.
◆ unsubscribe()
Wikibase\Client\Usage\Sql\SqlSubscriptionManager::unsubscribe |
( |
|
$subscriber, |
|
|
array |
$entityIds |
|
) |
| |
- See also
- SubscriptionManager::unsubscribe
- Parameters
-
string | $subscriber | Global site ID of the client |
EntityId[] | $entityIds | The entities to subscribe to. |
- Exceptions
-
InvalidArgumentException | |
UsageTrackerException | |
Exception | |
Implements Wikibase\Client\Usage\SubscriptionManager.
◆ $connectionManager
Wikibase\Client\Usage\Sql\SqlSubscriptionManager::$connectionManager |
|
private |
The documentation for this class was generated from the following file: