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 | * @param Activity $activity The Activity to filter by |
||
30 | * |
||
31 | * @return $this |
||
32 | */ |
||
33 | public function byActivity(Activity $activity) |
||
39 | |||
40 | /** |
||
41 | * Filters by an Agent. |
||
42 | * |
||
43 | * @param Agent $agent The Agent to filter by |
||
44 | * |
||
45 | * @return $this |
||
46 | */ |
||
47 | public function byAgent(Agent $agent) |
||
53 | |||
54 | /** |
||
55 | * Filters for State documents matching the given registration id. |
||
56 | * |
||
57 | * @param string $registration A registration id |
||
58 | * |
||
59 | * @return $this |
||
60 | */ |
||
61 | public function byRegistration($registration) |
||
67 | |||
68 | /** |
||
69 | * Filters for State documents stored since the specified timestamp (exclusive). |
||
70 | * |
||
71 | * @param \DateTime $timestamp The timestamp |
||
72 | * |
||
73 | * @return $this |
||
74 | */ |
||
75 | public function since(\DateTime $timestamp) |
||
81 | |||
82 | /** |
||
83 | * Returns the generated filter. |
||
84 | * |
||
85 | * @return array The filter |
||
86 | */ |
||
87 | public function getFilter() |
||
91 | } |
||
92 |