1 | <?php |
||
18 | class ManualBlocker extends BlockerAbstract |
||
19 | { |
||
20 | |||
21 | /** @var int admin-ID */ |
||
22 | private $adminId; |
||
23 | |||
24 | /** @var int duration in seconds */ |
||
25 | private $duration; |
||
26 | |||
27 | /** |
||
28 | * Constructor |
||
29 | * |
||
30 | * @param int $adminId user-ID of the person performing the block operation |
||
31 | * @param int|null $duration Time in seconds how long the block should be active |
||
32 | */ |
||
33 | public function __construct(int $adminId, ?int $duration = null) |
||
38 | |||
39 | /** |
||
40 | * {@inheritDoc} |
||
41 | */ |
||
42 | public function getReason() |
||
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | * |
||
50 | * @throws \InvalidArgumentException |
||
51 | * @throws \Exception |
||
52 | */ |
||
53 | public function block(int $userId): bool |
||
75 | } |
||
76 |