1 | <?php if ( ! defined('EVENT_ESPRESSO_VERSION')) exit('No direct script access allowed'); |
||
13 | class EEM_Attendee extends EEM_CPT_Base { |
||
14 | |||
15 | // private instance of the Attendee object |
||
16 | protected static $_instance = NULL; |
||
17 | |||
18 | /** |
||
19 | * QST_system for questions are strings not ints now, |
||
20 | * so these constants are deprecated. |
||
21 | * Please instead use the EEM_Attendee::system_question_* constants |
||
22 | * @deprecated |
||
23 | */ |
||
24 | const fname_question_id=1; |
||
25 | |||
26 | /** |
||
27 | * @deprecated |
||
28 | */ |
||
29 | const lname_question_id=2; |
||
30 | |||
31 | |||
32 | /** |
||
33 | * @deprecated |
||
34 | */ |
||
35 | const email_question_id=3; |
||
36 | |||
37 | |||
38 | /** |
||
39 | * @deprecated |
||
40 | */ |
||
41 | const address_question_id=4; |
||
42 | |||
43 | |||
44 | /** |
||
45 | * @deprecated |
||
46 | */ |
||
47 | const address2_question_id=5; |
||
48 | |||
49 | |||
50 | /** |
||
51 | * @deprecated |
||
52 | */ |
||
53 | const city_question_id=6; |
||
54 | |||
55 | |||
56 | /** |
||
57 | * @deprecated |
||
58 | */ |
||
59 | const state_question_id=7; |
||
60 | |||
61 | |||
62 | /** |
||
63 | * @deprecated |
||
64 | */ |
||
65 | const country_question_id=8; |
||
66 | |||
67 | |||
68 | /** |
||
69 | * @deprecated |
||
70 | */ |
||
71 | const zip_question_id=9; |
||
72 | |||
73 | |||
74 | /** |
||
75 | * @deprecated |
||
76 | */ |
||
77 | const phone_question_id=10; |
||
78 | |||
79 | /** |
||
80 | * When looking for questions that correspond to attendee fields, |
||
81 | * look for the question with this QST_system value. |
||
82 | * These replace the old constants like EEM_Attendee::*_question_id |
||
83 | */ |
||
84 | const system_question_fname = 'fname'; |
||
85 | const system_question_lname = 'lname'; |
||
86 | const system_question_email = 'email'; |
||
87 | const system_question_address = 'address'; |
||
88 | const system_question_address2 = 'address2'; |
||
89 | const system_question_city = 'city'; |
||
90 | const system_question_state = 'state'; |
||
91 | const system_question_country = 'country'; |
||
92 | const system_question_zip = 'zip'; |
||
93 | const system_question_phone = 'phone'; |
||
94 | |||
95 | /** |
||
96 | * Keys are all the EEM_Attendee::system_question_* constants, which are |
||
97 | * also all the values of QST_system in the questions table, and values |
||
98 | * are their corresponding Attendee field names |
||
99 | * @var array |
||
100 | */ |
||
101 | protected $_system_question_to_attendee_field_name = array( |
||
102 | EEM_Attendee::system_question_fname => 'ATT_fname', |
||
103 | EEM_Attendee::system_question_lname => 'ATT_lname', |
||
104 | EEM_Attendee::system_question_email => 'ATT_email', |
||
105 | EEM_Attendee::system_question_address => 'ATT_address', |
||
106 | EEM_Attendee::system_question_address2 => 'ATT_address2', |
||
107 | EEM_Attendee::system_question_city => 'ATT_city', |
||
108 | EEM_Attendee::system_question_state => 'STA_ID', |
||
109 | EEM_Attendee::system_question_country => 'CNT_ISO', |
||
110 | EEM_Attendee::system_question_zip => 'ATT_zip', |
||
111 | EEM_Attendee::system_question_phone => 'ATT_phone', |
||
112 | ); |
||
113 | |||
114 | |||
115 | /** |
||
116 | * private constructor to prevent direct creation |
||
117 | * |
||
118 | * @Constructor |
||
119 | * @access protected |
||
120 | * @param null $timezone |
||
121 | */ |
||
122 | protected function __construct( $timezone = NULL ) { |
||
169 | |||
170 | /** |
||
171 | * Gets the name of the field on the attendee model corresponding to the system question string |
||
172 | * which should be one of the keys from EEM_Attendee::_system_question_to_attendee_field_name |
||
173 | * @param string $system_question_string |
||
174 | * @return string|null if not found |
||
175 | */ |
||
176 | public function get_attendee_field_for_system_question( $system_question_string ) { |
||
179 | |||
180 | |||
181 | |||
182 | |||
183 | /** |
||
184 | * Gets all the attendees for a transaction (by using the esp_registration as a join table) |
||
185 | * @param EE_Transaction/int $transaction_id_or_obj EE_Transaction or its ID |
||
186 | * @return EE_Attendee[] |
||
187 | */ |
||
188 | public function get_attendees_for_transaction( $transaction_id_or_obj ){ |
||
193 | |||
194 | |||
195 | |||
196 | /** |
||
197 | * retrieve a single attendee from db via their ID |
||
198 | * |
||
199 | * @access public |
||
200 | * @param $ATT_ID |
||
201 | * @return mixed array on success, FALSE on fail |
||
202 | * @deprecated |
||
203 | */ |
||
204 | public function get_attendee_by_ID( $ATT_ID = FALSE ) { |
||
208 | |||
209 | |||
210 | |||
211 | |||
212 | /** |
||
213 | * retrieve a single attendee from db via their ID |
||
214 | * |
||
215 | * @access public |
||
216 | * @param array $where_cols_n_values |
||
217 | * @return mixed array on success, FALSE on fail |
||
218 | */ |
||
219 | public function get_attendee( $where_cols_n_values = array() ) { |
||
232 | |||
233 | |||
234 | |||
235 | /** |
||
236 | * Search for an existing Attendee record in the DB |
||
237 | * |
||
238 | * @access public |
||
239 | * @param array $where_cols_n_values |
||
240 | * @return bool|mixed |
||
241 | */ |
||
242 | public function find_existing_attendee( $where_cols_n_values = NULL ) { |
||
262 | |||
263 | |||
264 | |||
265 | /** |
||
266 | * Takes an incoming array of EE_Registration ids and sends back a list of corresponding non duplicate |
||
267 | * EE_Attendee objects. |
||
268 | * |
||
269 | * @since 4.3.0 |
||
270 | * @param array $ids array of EE_Registration ids |
||
271 | * @return EE_Attendee[] |
||
272 | */ |
||
273 | public function get_array_of_contacts_from_reg_ids( $ids ) { |
||
280 | |||
281 | |||
282 | } |
||
283 | // End of file EEM_Attendee.model.php |
||
285 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..