MediaWiki REL1_40
|
Public Member Functions | |
__construct (ServiceOptions $options, LoggerInterface $logger, ActorStoreFactory $actorStoreFactory, BlockRestrictionStore $blockRestrictionStore, CommentStore $commentStore, HookContainer $hookContainer, ILoadBalancer $loadBalancer, ReadOnlyMode $readOnlyMode, UserFactory $userFactory, $wikiId=DatabaseBlock::LOCAL) | |
deleteBlock (DatabaseBlock $block) | |
Delete a DatabaseBlock from the database. | |
insertBlock (DatabaseBlock $block, IDatabase $database=null) | |
Insert a block into the block table. | |
purgeExpiredBlocks () | |
Delete expired blocks from the ipblocks table. | |
updateBlock (DatabaseBlock $block) | |
Update a block in the DB with new parameters. | |
Public Attributes | |
const | CONSTRUCTOR_OPTIONS |
Definition at line 46 of file DatabaseBlockStore.php.
MediaWiki\Block\DatabaseBlockStore::__construct | ( | ServiceOptions | $options, |
LoggerInterface | $logger, | ||
ActorStoreFactory | $actorStoreFactory, | ||
BlockRestrictionStore | $blockRestrictionStore, | ||
CommentStore | $commentStore, | ||
HookContainer | $hookContainer, | ||
ILoadBalancer | $loadBalancer, | ||
ReadOnlyMode | $readOnlyMode, | ||
UserFactory | $userFactory, | ||
$wikiId = DatabaseBlock::LOCAL ) |
ServiceOptions | $options | |
LoggerInterface | $logger | |
ActorStoreFactory | $actorStoreFactory | |
BlockRestrictionStore | $blockRestrictionStore | |
CommentStore | $commentStore | |
HookContainer | $hookContainer | |
ILoadBalancer | $loadBalancer | |
ReadOnlyMode | $readOnlyMode | |
UserFactory | $userFactory | |
string | false | $wikiId |
Definition at line 98 of file DatabaseBlockStore.php.
References MediaWiki\Config\ServiceOptions\assertRequiredOptions().
MediaWiki\Block\DatabaseBlockStore::deleteBlock | ( | DatabaseBlock | $block | ) |
Delete a DatabaseBlock from the database.
DatabaseBlock | $block |
MWException |
Definition at line 360 of file DatabaseBlockStore.php.
MediaWiki\Block\DatabaseBlockStore::insertBlock | ( | DatabaseBlock | $block, |
IDatabase | $database = null ) |
Insert a block into the block table.
Will fail if there is a conflicting block (same name and options) already in the database.
DatabaseBlock | $block | |
IDatabase | null | $database | Database to use if not the same as the one in the load balancer. Must connect to the wiki identified by $block->getBlocker->getWikiId(). |
MWException |
Definition at line 195 of file DatabaseBlockStore.php.
References MediaWiki\MainConfigNames\BlockDisablesLogin, DB_PRIMARY, MediaWiki\Block\DatabaseBlock\getBlocker(), MediaWiki\Block\DatabaseBlock\getId(), MediaWiki\Block\DatabaseBlock\getRawRestrictions(), MediaWiki\Block\AbstractBlock\getTargetUserIdentity(), MediaWiki\Block\AbstractBlock\getTimestamp(), MediaWiki\Block\AbstractBlock\getWikiId(), MediaWiki\Block\DatabaseBlockStore\purgeExpiredBlocks(), and MediaWiki\Block\DatabaseBlock\setId().
MediaWiki\Block\DatabaseBlockStore::purgeExpiredBlocks | ( | ) |
Delete expired blocks from the ipblocks table.
Definition at line 130 of file DatabaseBlockStore.php.
References Wikimedia\Rdbms\Database\DbQuoter\addQuotes(), DB_PRIMARY, Wikimedia\Rdbms\IDatabase\delete(), Wikimedia\Rdbms\IReadableDatabase\selectFieldValues(), Wikimedia\Rdbms\Platform\ISQLPlatform\timestamp(), and MediaWiki\MainConfigNames\UpdateRowsPerQuery.
Referenced by MediaWiki\Block\DatabaseBlockStore\insertBlock().
MediaWiki\Block\DatabaseBlockStore::updateBlock | ( | DatabaseBlock | $block | ) |
Update a block in the DB with new parameters.
The ID field needs to be loaded first.
DatabaseBlock | $block |
Definition at line 280 of file DatabaseBlockStore.php.
References $success, DB_PRIMARY, MediaWiki\Block\DatabaseBlock\getId(), MediaWiki\Block\DatabaseBlock\getRawRestrictions(), MediaWiki\Block\AbstractBlock\getTimestamp(), MediaWiki\Block\AbstractBlock\getWikiId(), and MediaWiki\Block\DatabaseBlock\isAutoblocking().
const MediaWiki\Block\DatabaseBlockStore::CONSTRUCTOR_OPTIONS |
Definition at line 56 of file DatabaseBlockStore.php.