MediaWiki
REL1_39
BlockPermissionCheckerFactory.php
Go to the documentation of this file.
1
<?php
2
22
namespace
MediaWiki\Block
;
23
24
use
MediaWiki\Config\ServiceOptions
;
25
use
MediaWiki\Permissions\Authority
;
26
use
MediaWiki\User\UserIdentity
;
27
33
class
BlockPermissionCheckerFactory
{
34
36
private
$options;
37
41
public
const
CONSTRUCTOR_OPTIONS
=
BlockPermissionChecker::CONSTRUCTOR_OPTIONS
;
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
}
MediaWiki\Block\BlockPermissionCheckerFactory
Factory class for BlockPermissionChecker.
Definition
BlockPermissionCheckerFactory.php:33
MediaWiki\Block\BlockPermissionCheckerFactory\CONSTRUCTOR_OPTIONS
const CONSTRUCTOR_OPTIONS
Definition
BlockPermissionCheckerFactory.php:41
MediaWiki\Block\BlockPermissionCheckerFactory\newBlockPermissionChecker
newBlockPermissionChecker( $target, Authority $performer)
Definition
BlockPermissionCheckerFactory.php:65
MediaWiki\Block\BlockPermissionCheckerFactory\__construct
__construct(ServiceOptions $options, BlockUtils $blockUtils)
Definition
BlockPermissionCheckerFactory.php:50
MediaWiki\Block\BlockPermissionChecker
Block permissions.
Definition
BlockPermissionChecker.php:39
MediaWiki\Block\BlockPermissionChecker\CONSTRUCTOR_OPTIONS
const CONSTRUCTOR_OPTIONS
Definition
BlockPermissionChecker.php:58
MediaWiki\Block\BlockUtils
Backend class for blocking utils.
Definition
BlockUtils.php:46
MediaWiki\Config\ServiceOptions
A class for passing options to services.
Definition
ServiceOptions.php:27
MediaWiki\Config\ServiceOptions\assertRequiredOptions
assertRequiredOptions(array $expectedKeys)
Assert that the list of options provided in this instance exactly match $expectedKeys,...
Definition
ServiceOptions.php:71
MediaWiki\Permissions\Authority
This interface represents the authority associated the current execution context, such as a web reque...
Definition
Authority.php:37
MediaWiki\User\UserIdentity
Interface for objects representing user identity.
Definition
UserIdentity.php:39
MediaWiki\Block
Definition
AbstractBlock.php:21
includes
block
BlockPermissionCheckerFactory.php
Generated on Mon Oct 14 2024 07:22:40 for MediaWiki by
1.10.0