Merge pull request #17956 from eileenmcnaughton/export_phone
[civicrm-core.git] / Civi / Api4 / Event / PostSelectQueryEvent.php
1 <?php
2
3 /*
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC. All rights reserved. |
6 | |
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 |
10 +--------------------------------------------------------------------+
11 */
12
13 /**
14 *
15 * @package CRM
16 * @copyright CiviCRM LLC https://civicrm.org/licensing
17 */
18
19
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 }