Commit | Line | Data |
---|---|---|
19b53e5b C |
1 | <?php |
2 | ||
3 | namespace Civi\Api4\Event; | |
4 | ||
5 | use Civi\Api4\Query\Api4SelectQuery; | |
6 | use Symfony\Component\EventDispatcher\Event; | |
7 | ||
8 | class PostSelectQueryEvent extends Event { | |
9 | ||
10 | /** | |
11 | * @var array | |
12 | */ | |
13 | protected $results; | |
14 | ||
15 | /** | |
16 | * @var \Civi\Api4\Query\Api4SelectQuery | |
17 | */ | |
18 | protected $query; | |
19 | ||
20 | /** | |
21 | * PostSelectQueryEvent constructor. | |
22 | * @param array $results | |
23 | * @param \Civi\Api4\Query\Api4SelectQuery $query | |
24 | */ | |
25 | public function __construct(array $results, Api4SelectQuery $query) { | |
26 | $this->results = $results; | |
27 | $this->query = $query; | |
28 | } | |
29 | ||
30 | /** | |
31 | * @return array | |
32 | */ | |
33 | public function getResults() { | |
34 | return $this->results; | |
35 | } | |
36 | ||
37 | /** | |
38 | * @param array $results | |
39 | * @return $this | |
40 | */ | |
41 | public function setResults($results) { | |
42 | $this->results = $results; | |
43 | ||
44 | return $this; | |
45 | } | |
46 | ||
47 | /** | |
48 | * @return \Civi\Api4\Query\Api4SelectQuery | |
49 | */ | |
50 | public function getQuery() { | |
51 | return $this->query; | |
52 | } | |
53 | ||
54 | /** | |
55 | * @param \Civi\Api4\Query\Api4SelectQuery $query | |
56 | * @return $this | |
57 | */ | |
58 | public function setQuery($query) { | |
59 | $this->query = $query; | |
60 | ||
61 | return $this; | |
62 | } | |
63 | ||
64 | } |