MediaWiki master
BlockPermissionCheckerFactory.php
Go to the documentation of this file.
1<?php
2
22namespace 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
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.
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 with the current execution context,...
Definition Authority.php:37
Interface for objects representing user identity.