1 | <?php |
||
25 | class PayloadPropertyCondition implements Condition |
||
26 | { |
||
27 | /** |
||
28 | * Payload property name. |
||
29 | * |
||
30 | * @var string |
||
31 | */ |
||
32 | private $property; |
||
33 | |||
34 | /** |
||
35 | * Expected value. |
||
36 | * |
||
37 | * @var mixed |
||
38 | */ |
||
39 | private $value; |
||
40 | |||
41 | /** |
||
42 | * Comparison operator. |
||
43 | * |
||
44 | * @var string |
||
45 | */ |
||
46 | private $operator; |
||
47 | |||
48 | /** |
||
49 | * PayloadPropertyCondition constructor. |
||
50 | * |
||
51 | * @param string $property Payload property name. |
||
52 | * @param mixed $value Expected value. |
||
53 | * @param string $operator Comparison operator. |
||
54 | */ |
||
55 | public function __construct(string $property, $value, string $operator = Comparison::EQUALS) |
||
61 | |||
62 | /** |
||
63 | * {@inheritdoc} |
||
64 | */ |
||
65 | public function match(Transition $transition, Item $item, Context $context): bool |
||
85 | } |
||
86 |