MediaWiki REL1_37
Block.php
Go to the documentation of this file.
1<?php
2
22namespace MediaWiki\Block;
23
26
37interface Block {
38
39 # TYPE constants
40 # Do not introduce negative constants without changing BlockUser command object.
41 public const TYPE_USER = 1;
42 public const TYPE_IP = 2;
43 public const TYPE_RANGE = 3;
44 public const TYPE_AUTO = 4;
45 public const TYPE_ID = 5;
46
51 public function getId(): ?int;
52
61 public function getIdentifier();
62
68 public function getBlocker(): ?UserIdentity;
69
76
84
92 public function getTargetName(): string;
93
101 public function isBlocking( $target ): bool;
102
108 public function getExpiry(): string;
109
114 public function getType(): ?int;
115
121 public function getTimestamp(): string;
122
130 public function isSitewide(): bool;
131
139 public function isCreateAccountBlocked(): bool;
140
148 public function isHardblock(): bool;
149
150}
Value object for a comment stored by CommentStore.
Represents a block that may prevent users from performing specific operations.
Definition Block.php:37
isSitewide()
Indicates that the block is a sitewide block.
isHardblock()
Returns whether the block is a hardblock (affects logged-in users on a given IP/range)
getBlocker()
Get the user who applied this block.
getIdentifier()
Get the information that identifies this block, such that a user could look up everything that can be...
getId()
Get the block ID.
getTimestamp()
Get the timestamp indicating when the block was created.
getTargetName()
Return the name of the block target as a string.
getTargetUserIdentity()
Get the UserIdentity identifying the blocked user, if the target is indeed a user (that is,...
isBlocking( $target)
Determines whether this block is blocking the given target (and only that target).
getReasonComment()
Get the reason for creating the block.
isCreateAccountBlocked()
Get the flag indicating whether this block blocks the target from creating an account.
getType()
Get the type of target for this particular block.
getExpiry()
Get the block expiry time.
Interface for objects representing user identity.