Commit | Line | Data |
---|---|---|
19b53e5b C |
1 | <?php |
2 | ||
380f3545 TO |
3 | /* |
4 | +--------------------------------------------------------------------+ | |
41498ac5 | 5 | | Copyright CiviCRM LLC. All rights reserved. | |
380f3545 | 6 | | | |
41498ac5 TO |
7 | | This work is published under the GNU AGPLv3 license with some | |
8 | | permitted exceptions and without any warranty. For full license | | |
9 | | and copyright information, see https://civicrm.org/licensing | | |
380f3545 TO |
10 | +--------------------------------------------------------------------+ |
11 | */ | |
12 | ||
19b53e5b C |
13 | namespace Civi\Api4\Event; |
14 | ||
15 | use Civi\Api4\Query\Api4SelectQuery; | |
16 | use Symfony\Component\EventDispatcher\Event; | |
17 | ||
18 | class PostSelectQueryEvent extends Event { | |
19 | ||
20 | /** | |
21 | * @var array | |
22 | */ | |
23 | protected $results; | |
24 | ||
25 | /** | |
26 | * @var \Civi\Api4\Query\Api4SelectQuery | |
27 | */ | |
28 | protected $query; | |
29 | ||
30 | /** | |
31 | * PostSelectQueryEvent constructor. | |
32 | * @param array $results | |
33 | * @param \Civi\Api4\Query\Api4SelectQuery $query | |
34 | */ | |
35 | public function __construct(array $results, Api4SelectQuery $query) { | |
36 | $this->results = $results; | |
37 | $this->query = $query; | |
38 | } | |
39 | ||
40 | /** | |
41 | * @return array | |
42 | */ | |
43 | public function getResults() { | |
44 | return $this->results; | |
45 | } | |
46 | ||
47 | /** | |
48 | * @param array $results | |
49 | * @return $this | |
50 | */ | |
51 | public function setResults($results) { | |
52 | $this->results = $results; | |
53 | ||
54 | return $this; | |
55 | } | |
56 | ||
57 | /** | |
58 | * @return \Civi\Api4\Query\Api4SelectQuery | |
59 | */ | |
60 | public function getQuery() { | |
61 | return $this->query; | |
62 | } | |
63 | ||
64 | /** | |
65 | * @param \Civi\Api4\Query\Api4SelectQuery $query | |
66 | * @return $this | |
67 | */ | |
68 | public function setQuery($query) { | |
69 | $this->query = $query; | |
70 | ||
71 | return $this; | |
72 | } | |
73 | ||
74 | } |