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(
51  ServiceOptions $options,
52  BlockUtils $blockUtils
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 }
__construct(ServiceOptions $options, BlockUtils $blockUtils)
Backend class for blocking utils.
Definition: BlockUtils.php:46
A class for passing options to services.
assertRequiredOptions(array $expectedKeys)
Assert that the list of options provided in this instance exactly match $expectedKeys,...
This interface represents the authority associated the current execution context, such as a web reque...
Definition: Authority.php:37
Interface for objects representing user identity.