MediaWiki REL1_39
|
Public Member Functions | |
__construct (ServiceOptions $options, LoggerInterface $logger, ActorStoreFactory $actorStoreFactory, BlockRestrictionStore $blockRestrictionStore, CommentStore $commentStore, HookContainer $hookContainer, ILoadBalancer $loadBalancer, ReadOnlyMode $readOnlyMode, UserFactory $userFactory) | |
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 47 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 ) |
ServiceOptions | $options | |
LoggerInterface | $logger | |
ActorStoreFactory | $actorStoreFactory | |
BlockRestrictionStore | $blockRestrictionStore | |
CommentStore | $commentStore | |
HookContainer | $hookContainer | |
ILoadBalancer | $loadBalancer | |
ReadOnlyMode | $readOnlyMode | |
UserFactory | $userFactory |
Definition at line 96 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 358 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 190 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 125 of file DatabaseBlockStore.php.
References Wikimedia\Rdbms\Database\DbQuoter\addQuotes(), DB_PRIMARY, Wikimedia\Rdbms\IDatabase\delete(), Wikimedia\Rdbms\IDatabase\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 275 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 55 of file DatabaseBlockStore.php.