48 parent::__construct( $options );
51 'originalBlocks' => [],
54 $options += $defaults;
56 $this->originalBlocks = $options[
'originalBlocks' ];
74 foreach ( $this->originalBlocks as $block ) {
75 if ( $block->$prop == $value ) {
92 foreach ( $this->originalBlocks as $block ) {
93 if ( $block->$method( ...$params ) == $value ) {
115 foreach ( $this->originalBlocks as $block ) {
116 $expiry = $block->getExpiry();
117 if ( $maxExpiry ===
null || $expiry ===
'' || $expiry > $maxExpiry ) {
118 $maxExpiry = $expiry;
131 foreach ( $this->originalBlocks as $block ) {
132 $id = $block->getId();
133 if ( $id !==
null ) {
146 $ids = implode(
', ', array_map(
function ( $id ) {
150 $idsMsg =
$context->msg(
'blockedtext-composite-no-ids' )->plain();
152 $idsMsg =
$context->msg(
'blockedtext-composite-ids', [ $ids ] )->plain();
156 $params[ 4 ] = $idsMsg;
158 $msg =
'blockedtext-composite';
160 array_unshift( $params, $msg );
178 foreach ( $this->originalBlocks as $block ) {
179 $appliesToRight = $block->appliesToRight( $right );
181 if ( $appliesToRight ) {
183 } elseif ( $appliesToRight ===
null ) {
188 return $isUnsure ? null :
false;
Represents a title within MediaWiki.
Interface for objects which can provide a MediaWiki context on request.