MediaWiki  master
BlockPermissionCheckerFactory.php
Go to the documentation of this file.
1 <?php
2 
22 namespace MediaWiki\Block;
23 
27 
34 
36  private $options;
37 
42 
44  private $blockUtils;
45 
50  public function __construct(
53  ) {
54  $options->assertRequiredOptions( self::CONSTRUCTOR_OPTIONS );
55  $this->options = $options;
56  $this->blockUtils = $blockUtils;
57  }
58 
65  public function newBlockPermissionChecker(
66  $target,
67  Authority $performer
68  ) {
69  return new BlockPermissionChecker(
70  $this->options,
71  $this->blockUtils,
72  $target,
73  $performer
74  );
75  }
76 }
MediaWiki\Block\BlockPermissionCheckerFactory
Factory class for BlockPermissionChecker.
Definition: BlockPermissionCheckerFactory.php:33
MediaWiki\Block
Definition: AbstractBlock.php:21
MediaWiki\Block\BlockUtils
Backend class for blocking utils.
Definition: BlockUtils.php:45
MediaWiki\Block\BlockPermissionCheckerFactory\CONSTRUCTOR_OPTIONS
const CONSTRUCTOR_OPTIONS
Definition: BlockPermissionCheckerFactory.php:41
MediaWiki\User\UserIdentity
Interface for objects representing user identity.
Definition: UserIdentity.php:39
MediaWiki\Block\BlockPermissionCheckerFactory\$blockUtils
BlockUtils $blockUtils
Definition: BlockPermissionCheckerFactory.php:44
MediaWiki\Config\ServiceOptions
A class for passing options to services.
Definition: ServiceOptions.php:27
MediaWiki\Block\BlockPermissionCheckerFactory\newBlockPermissionChecker
newBlockPermissionChecker( $target, Authority $performer)
Definition: BlockPermissionCheckerFactory.php:65
MediaWiki\Block\BlockPermissionChecker\CONSTRUCTOR_OPTIONS
const CONSTRUCTOR_OPTIONS
Definition: BlockPermissionChecker.php:57
MediaWiki\Permissions\Authority
This interface represents the authority associated the current execution context, such as a web reque...
Definition: Authority.php:37
MediaWiki\Block\BlockPermissionChecker
Block permissions.
Definition: BlockPermissionChecker.php:38
MediaWiki\Block\BlockPermissionCheckerFactory\__construct
__construct(ServiceOptions $options, BlockUtils $blockUtils)
Definition: BlockPermissionCheckerFactory.php:50
MediaWiki\Block\BlockPermissionCheckerFactory\$options
ServiceOptions $options
Definition: BlockPermissionCheckerFactory.php:36
MediaWiki\Config\ServiceOptions\assertRequiredOptions
assertRequiredOptions(array $expectedKeys)
Assert that the list of options provided in this instance exactly match $expectedKeys,...
Definition: ServiceOptions.php:71