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 | ||
13 | /** | |
14 | * | |
15 | * @package CRM | |
ca5cec67 | 16 | * @copyright CiviCRM LLC https://civicrm.org/licensing |
380f3545 TO |
17 | */ |
18 | ||
19 | ||
19b53e5b C |
20 | namespace Civi\Api4\Event; |
21 | ||
22 | use Civi\Api4\Query\Api4SelectQuery; | |
23 | use Symfony\Component\EventDispatcher\Event; | |
24 | ||
25 | class PostSelectQueryEvent extends Event { | |
26 | ||
27 | /** | |
28 | * @var array | |
29 | */ | |
30 | protected $results; | |
31 | ||
32 | /** | |
33 | * @var \Civi\Api4\Query\Api4SelectQuery | |
34 | */ | |
35 | protected $query; | |
36 | ||
37 | /** | |
38 | * PostSelectQueryEvent constructor. | |
39 | * @param array $results | |
40 | * @param \Civi\Api4\Query\Api4SelectQuery $query | |
41 | */ | |
42 | public function __construct(array $results, Api4SelectQuery $query) { | |
43 | $this->results = $results; | |
44 | $this->query = $query; | |
45 | } | |
46 | ||
47 | /** | |
48 | * @return array | |
49 | */ | |
50 | public function getResults() { | |
51 | return $this->results; | |
52 | } | |
53 | ||
54 | /** | |
55 | * @param array $results | |
56 | * @return $this | |
57 | */ | |
58 | public function setResults($results) { | |
59 | $this->results = $results; | |
60 | ||
61 | return $this; | |
62 | } | |
63 | ||
64 | /** | |
65 | * @return \Civi\Api4\Query\Api4SelectQuery | |
66 | */ | |
67 | public function getQuery() { | |
68 | return $this->query; | |
69 | } | |
70 | ||
71 | /** | |
72 | * @param \Civi\Api4\Query\Api4SelectQuery $query | |
73 | * @return $this | |
74 | */ | |
75 | public function setQuery($query) { | |
76 | $this->query = $query; | |
77 | ||
78 | return $this; | |
79 | } | |
80 | ||
81 | } |