MediaWiki
master
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
{
37
public
const
CONSTRUCTOR_OPTIONS
=
BlockPermissionChecker::CONSTRUCTOR_OPTIONS
;
38
39
private
ServiceOptions
$options;
40
private
BlockUtils
$blockUtils;
41
42
public
function
__construct
(
43
ServiceOptions
$options,
44
BlockUtils
$blockUtils
45
) {
46
$options->
assertRequiredOptions
( self::CONSTRUCTOR_OPTIONS );
47
$this->options = $options;
48
$this->blockUtils = $blockUtils;
49
}
50
57
public
function
newBlockPermissionChecker
(
58
$target,
59
Authority
$performer
60
) {
61
return
new
BlockPermissionChecker
(
62
$this->options,
63
$this->blockUtils,
64
$target,
65
$performer
66
);
67
}
68
}
MediaWiki\Block\BlockPermissionCheckerFactory
Factory class for BlockPermissionChecker.
Definition
BlockPermissionCheckerFactory.php:33
MediaWiki\Block\BlockPermissionCheckerFactory\CONSTRUCTOR_OPTIONS
const CONSTRUCTOR_OPTIONS
Definition
BlockPermissionCheckerFactory.php:37
MediaWiki\Block\BlockPermissionCheckerFactory\newBlockPermissionChecker
newBlockPermissionChecker( $target, Authority $performer)
Definition
BlockPermissionCheckerFactory.php:57
MediaWiki\Block\BlockPermissionCheckerFactory\__construct
__construct(ServiceOptions $options, BlockUtils $blockUtils)
Definition
BlockPermissionCheckerFactory.php:42
MediaWiki\Block\BlockPermissionChecker
Block permissions.
Definition
BlockPermissionChecker.php:38
MediaWiki\Block\BlockPermissionChecker\CONSTRUCTOR_OPTIONS
const CONSTRUCTOR_OPTIONS
Definition
BlockPermissionChecker.php:52
MediaWiki\Block\BlockUtils
Backend class for blocking utils.
Definition
BlockUtils.php:47
MediaWiki\Config\ServiceOptions
A class for passing options to services.
Definition
ServiceOptions.php:26
MediaWiki\Config\ServiceOptions\assertRequiredOptions
assertRequiredOptions(array $expectedKeys)
Assert that the list of options provided in this instance exactly match $expectedKeys,...
Definition
ServiceOptions.php:70
MediaWiki\Permissions\Authority
This interface represents the authority associated with the current execution context,...
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 Thu Oct 3 2024 19:23:14 for MediaWiki by
1.10.0