|
MediaWiki REL1_39
|
Public Member Functions | |
| __construct (ILoadBalancer $loadBalancer, $wikiId=WikiAwareEntity::LOCAL) | |
| delete (array $restrictions) | |
| Delete the restrictions. | |
| deleteByBlockId ( $blockId) | |
| Delete the restrictions by block ID. | |
| deleteByParentBlockId ( $parentBlockId) | |
| Delete the restrictions by parent block ID. | |
| equals (array $a, array $b) | |
| Checks if two arrays of Restrictions are effectively equal. | |
| insert (array $restrictions) | |
| Inserts the restrictions into the database. | |
| loadByBlockId ( $blockId) | |
| Retrieves the restrictions from the database by block id. | |
| setBlockId ( $blockId, array $restrictions) | |
| Set the blockId on a set of restrictions and return a new set. | |
| update (array $restrictions) | |
| Updates the list of restrictions. | |
| updateByParentBlockId ( $parentBlockId, array $restrictions) | |
| Updates the list of restrictions by parent id. | |
Definition at line 35 of file BlockRestrictionStore.php.
| MediaWiki\Block\BlockRestrictionStore::__construct | ( | ILoadBalancer | $loadBalancer, |
| $wikiId = WikiAwareEntity::LOCAL ) |
| ILoadBalancer | $loadBalancer | load balancer for acquiring database connections |
| string | false | $wikiId |
Definition at line 60 of file BlockRestrictionStore.php.
| MediaWiki\Block\BlockRestrictionStore::delete | ( | array | $restrictions | ) |
Delete the restrictions.
| Restriction[] | $restrictions |
| MWException |
Definition at line 243 of file BlockRestrictionStore.php.
References $success, and DB_PRIMARY.
| MediaWiki\Block\BlockRestrictionStore::deleteByBlockId | ( | $blockId | ) |
Delete the restrictions by block ID.
| int | array | $blockId |
| MWException |
Definition at line 273 of file BlockRestrictionStore.php.
References DB_PRIMARY.
| MediaWiki\Block\BlockRestrictionStore::deleteByParentBlockId | ( | $parentBlockId | ) |
Delete the restrictions by parent block ID.
| int | array | $parentBlockId |
| MWException |
Definition at line 290 of file BlockRestrictionStore.php.
References DB_PRIMARY.
Referenced by MediaWiki\Block\BlockRestrictionStore\updateByParentBlockId().
| MediaWiki\Block\BlockRestrictionStore::equals | ( | array | $a, |
| array | $b ) |
Checks if two arrays of Restrictions are effectively equal.
This is a loose equality check as the restrictions do not have to contain the same block ids.
| Restriction[] | $a | |
| Restriction[] | $b |
Definition at line 312 of file BlockRestrictionStore.php.
| MediaWiki\Block\BlockRestrictionStore::insert | ( | array | $restrictions | ) |
Inserts the restrictions into the database.
| Restriction[] | $restrictions |
Definition at line 101 of file BlockRestrictionStore.php.
References DB_PRIMARY.
Referenced by MediaWiki\Block\BlockRestrictionStore\update().
| MediaWiki\Block\BlockRestrictionStore::loadByBlockId | ( | $blockId | ) |
Retrieves the restrictions from the database by block id.
| int | array | $blockId |
Definition at line 75 of file BlockRestrictionStore.php.
References DB_REPLICA.
| MediaWiki\Block\BlockRestrictionStore::setBlockId | ( | $blockId, | |
| array | $restrictions ) |
Set the blockId on a set of restrictions and return a new set.
| int | $blockId | |
| Restriction[] | $restrictions |
Definition at line 357 of file BlockRestrictionStore.php.
Referenced by MediaWiki\Block\BlockRestrictionStore\updateByParentBlockId().
| MediaWiki\Block\BlockRestrictionStore::update | ( | array | $restrictions | ) |
Updates the list of restrictions.
This method does not allow removing all of the restrictions. To do that, use ::deleteByBlockId().
| Restriction[] | $restrictions |
Definition at line 138 of file BlockRestrictionStore.php.
References $success, DB_PRIMARY, and MediaWiki\Block\BlockRestrictionStore\insert().
Referenced by MediaWiki\Block\BlockRestrictionStore\updateByParentBlockId().
| MediaWiki\Block\BlockRestrictionStore::updateByParentBlockId | ( | $parentBlockId, | |
| array | $restrictions ) |
Updates the list of restrictions by parent id.
| int | $parentBlockId | |
| Restriction[] | $restrictions |
Definition at line 203 of file BlockRestrictionStore.php.
References $success, DB_PRIMARY, MediaWiki\Block\BlockRestrictionStore\deleteByParentBlockId(), MediaWiki\Block\BlockRestrictionStore\setBlockId(), and MediaWiki\Block\BlockRestrictionStore\update().