Merge pull request #16005 from magnolia61/Contribution_Invoice_Privacy
[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 * $Id$
18 *
19 */
20
21
22 namespace Civi\Api4\Event;
23
24 use Civi\Api4\Query\Api4SelectQuery;
25 use Symfony\Component\EventDispatcher\Event;
26
27 class PostSelectQueryEvent extends Event {
28
29 /**
30 * @var array
31 */
32 protected $results;
33
34 /**
35 * @var \Civi\Api4\Query\Api4SelectQuery
36 */
37 protected $query;
38
39 /**
40 * PostSelectQueryEvent constructor.
41 * @param array $results
42 * @param \Civi\Api4\Query\Api4SelectQuery $query
43 */
44 public function __construct(array $results, Api4SelectQuery $query) {
45 $this->results = $results;
46 $this->query = $query;
47 }
48
49 /**
50 * @return array
51 */
52 public function getResults() {
53 return $this->results;
54 }
55
56 /**
57 * @param array $results
58 * @return $this
59 */
60 public function setResults($results) {
61 $this->results = $results;
62
63 return $this;
64 }
65
66 /**
67 * @return \Civi\Api4\Query\Api4SelectQuery
68 */
69 public function getQuery() {
70 return $this->query;
71 }
72
73 /**
74 * @param \Civi\Api4\Query\Api4SelectQuery $query
75 * @return $this
76 */
77 public function setQuery($query) {
78 $this->query = $query;
79
80 return $this;
81 }
82
83 }