1 | <?php |
||
9 | class WPSC_Checkout_Form_Data extends WPSC_Query_Base { |
||
10 | protected $raw_data = array(); |
||
11 | protected $segmented_data = array(); |
||
12 | protected $gateway_data = array(); |
||
13 | protected $submitted_data = array(); |
||
14 | protected $log_id = 0; |
||
15 | |||
16 | /** |
||
17 | * An array of arrays of cache keys. Allows versioning the cached values, |
||
18 | * and busting cache for a group if needed (by incrementing the version). |
||
19 | * |
||
20 | * @var array |
||
21 | */ |
||
22 | protected $group_ids = array( |
||
23 | 'raw_data' => array( |
||
24 | 'group' => 'wpsc_checkout_form_raw_data', |
||
25 | 'version' => 1, |
||
26 | ), |
||
27 | 'gateway_data' => array( |
||
28 | 'group' => 'wpsc_checkout_form_gateway_data', |
||
29 | 'version' => 0, |
||
30 | ), |
||
31 | ); |
||
32 | |||
33 | public function __construct( $log_id, $pre_fetch = true ) { |
||
39 | |||
40 | /** |
||
41 | * Fetches the actual $data array. |
||
42 | * |
||
43 | * @access protected |
||
44 | * @since 4.0 |
||
45 | * |
||
46 | * @return WPSC_Checkout_Form_Data |
||
47 | */ |
||
48 | protected function fetch() { |
||
100 | |||
101 | /** |
||
102 | * Get the raw data indexed by the 'id' column. |
||
103 | * |
||
104 | * @since 4.0 |
||
105 | * |
||
106 | * @return array |
||
107 | */ |
||
108 | public function get_indexed_raw_data() { |
||
118 | |||
119 | /** |
||
120 | * Determines if values in shipping fields matches values in billing fields. |
||
121 | * |
||
122 | * @since 4.0 |
||
123 | * |
||
124 | * @return bool Whether shipping values match billing values. |
||
125 | */ |
||
126 | public function shipping_matches_billing() { |
||
151 | |||
152 | /** |
||
153 | * Get the segmented billing info. |
||
154 | * |
||
155 | * @since 4.0 |
||
156 | * |
||
157 | * @return array |
||
158 | */ |
||
159 | public function get_billing_data() { |
||
164 | |||
165 | /** |
||
166 | * Get the segmented shipping info. |
||
167 | * |
||
168 | * @since 4.0 |
||
169 | * |
||
170 | * @return array |
||
171 | */ |
||
172 | public function get_shipping_data() { |
||
177 | |||
178 | /** |
||
179 | * Gets the raw data array. |
||
180 | * |
||
181 | * @since 4.0 |
||
182 | * |
||
183 | * @return array |
||
184 | */ |
||
185 | public function get_raw_data() { |
||
190 | |||
191 | /** |
||
192 | * Prepares the return value for get() (apply_filters, etc). |
||
193 | * |
||
194 | * @access protected |
||
195 | * @since 4.0 |
||
196 | * |
||
197 | * @param mixed $value Value fetched |
||
198 | * @param string $key Key for $data. |
||
199 | * |
||
200 | * @return mixed |
||
201 | */ |
||
202 | protected function prepare_get( $value, $key ) { |
||
205 | |||
206 | /** |
||
207 | * Prepares the return value for get_data() (apply_filters, etc). |
||
208 | * |
||
209 | * @access protected |
||
210 | * @since 4.0 |
||
211 | * |
||
212 | * @return mixed |
||
213 | */ |
||
214 | protected function prepare_get_data() { |
||
217 | |||
218 | public function get_gateway_data() { |
||
262 | |||
263 | /** |
||
264 | * Set specific database fields. |
||
265 | * |
||
266 | * @param string|int $key Expects either form ID or unique name. |
||
267 | * @param string $value Value to be set for field. |
||
268 | * |
||
269 | * @since 4.0 |
||
270 | * @return WPSC_Checkout_Form_Data Current instance of form data. |
||
271 | */ |
||
272 | public function set( $key, $value = '' ) { |
||
283 | |||
284 | /** |
||
285 | * Used in conjunction with set() method, saves individual checkout form fields to database. |
||
286 | * |
||
287 | * @since 4.0 |
||
288 | * @return void |
||
289 | */ |
||
290 | public function save() { |
||
302 | |||
303 | /** |
||
304 | * Save Submitted Form Fields to the wpsc_submited_form_data table. |
||
305 | * |
||
306 | * @param WPSC_Purchase_Log $purchase_log |
||
307 | * @param array $fields |
||
308 | * @param array $data |
||
309 | * @param bool $update_customer |
||
310 | * @return void |
||
311 | */ |
||
312 | public static function save_form( $purchase_log, $fields, $data = array(), $update_customer = true ) { |
||
360 | |||
361 | /** |
||
362 | * Returns the log id property. |
||
363 | * |
||
364 | * @since 4.0 |
||
365 | * |
||
366 | * @return int The log id. |
||
367 | */ |
||
368 | public function get_log_id() { |
||
371 | |||
372 | } |
||
373 |
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..