ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ConditionalIntercept.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
25use Closure;
26
27final class ConditionalIntercept implements Intercept
28{
32 public function __construct(
33 private readonly Closure $intercept,
34 private readonly string $id,
35 private readonly Target $target
36 ) {
37 }
38
39 public function intercept(): bool
40 {
41 return ($this->intercept)();
42 }
43
44 public function id(): string
45 {
46 return $this->id;
47 }
48
49 public function target(): Target
50 {
51 return $this->target;
52 }
53}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
__construct(private readonly Closure $intercept, private readonly string $id, private readonly Target $target)