1 | <?php |
||
19 | class StateDocumentsFilter |
||
20 | { |
||
21 | /** |
||
22 | * @var array The generated filter |
||
23 | */ |
||
24 | private $filter = array(); |
||
25 | |||
26 | /** |
||
27 | * Filter by an Activity. |
||
28 | */ |
||
29 | public function byActivity(Activity $activity): self |
||
35 | |||
36 | /** |
||
37 | * Filters by an Agent. |
||
38 | */ |
||
39 | public function byAgent(Agent $agent): self |
||
45 | |||
46 | /** |
||
47 | * Filters for State documents matching the given registration id. |
||
48 | */ |
||
49 | public function byRegistration(string $registration): self |
||
55 | |||
56 | /** |
||
57 | * Filters for State documents stored since the specified timestamp (exclusive). |
||
58 | */ |
||
59 | public function since(\DateTime $timestamp): self |
||
65 | |||
66 | /** |
||
67 | * Returns the generated filter. |
||
68 | * |
||
69 | * @return array The filter |
||
70 | */ |
||
71 | public function getFilter(): array |
||
75 | } |
||
76 |