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 ) { |
||
37 | |||
38 | /** |
||
39 | * Fetches the actual $data array. |
||
40 | * |
||
41 | * @access protected |
||
42 | * @since 4.0 |
||
43 | * |
||
44 | * @return void |
||
45 | */ |
||
46 | protected function fetch() { |
||
96 | |||
97 | /** |
||
98 | * Get the raw data indexed by the 'id' column. |
||
99 | * |
||
100 | * @since 4.0 |
||
101 | * |
||
102 | * @return array |
||
103 | */ |
||
104 | public function get_indexed_raw_data() { |
||
112 | |||
113 | /** |
||
114 | * Determines if values in shipping fields matches values in billing fields. |
||
115 | * |
||
116 | * @since 4.0 |
||
117 | * |
||
118 | * @return bool Whether shipping values match billing values. |
||
119 | */ |
||
120 | public function shipping_matches_billing() { |
||
143 | |||
144 | /** |
||
145 | * Get the segmented billing info. |
||
146 | * |
||
147 | * @since 4.0 |
||
148 | * |
||
149 | * @return array |
||
150 | */ |
||
151 | public function get_billing_data() { |
||
154 | |||
155 | /** |
||
156 | * Get the segmented shipping info. |
||
157 | * |
||
158 | * @since 4.0 |
||
159 | * |
||
160 | * @return array |
||
161 | */ |
||
162 | public function get_shipping_data() { |
||
165 | |||
166 | /** |
||
167 | * Gets the raw data array. |
||
168 | * |
||
169 | * @since 4.0 |
||
170 | * |
||
171 | * @return array |
||
172 | */ |
||
173 | public function get_raw_data() { |
||
176 | |||
177 | /** |
||
178 | * Prepares the return value for get() (apply_filters, etc). |
||
179 | * |
||
180 | * @access protected |
||
181 | * @since 4.0 |
||
182 | * |
||
183 | * @param mixed $value Value fetched |
||
184 | * @param string $key Key for $data. |
||
185 | * |
||
186 | * @return mixed |
||
187 | */ |
||
188 | protected function prepare_get( $value, $key ) { |
||
191 | |||
192 | /** |
||
193 | * Prepares the return value for get_data() (apply_filters, etc). |
||
194 | * |
||
195 | * @access protected |
||
196 | * @since 4.0 |
||
197 | * |
||
198 | * @return mixed |
||
199 | */ |
||
200 | protected function prepare_get_data() { |
||
203 | |||
204 | public function get_gateway_data() { |
||
248 | |||
249 | /** |
||
250 | * Set specific database fields. |
||
251 | * |
||
252 | * @param string|int $key Expects either form ID or unique name. |
||
253 | * @param string $value Value to be set for field. |
||
254 | * |
||
255 | * @since 4.0 |
||
256 | * @return WPSC_Checkout_Form_Data Current instance of form data. |
||
257 | */ |
||
258 | public function set( $key, $value = '' ) { |
||
269 | |||
270 | /** |
||
271 | * Used in conjunction with set() method, saves individual checkout form fields to database. |
||
272 | * |
||
273 | * @since 4.0 |
||
274 | * @return void |
||
275 | */ |
||
276 | public function save() { |
||
288 | |||
289 | /** |
||
290 | * Save Submitted Form Fields to the wpsc_submited_form_data table. |
||
291 | * |
||
292 | * @param WPSC_Purchase_Log $purchase_log |
||
293 | * @param array $fields |
||
294 | * @return void |
||
295 | */ |
||
296 | public static function save_form( $purchase_log, $fields, $data = array() ) { |
||
342 | |||
343 | /** |
||
344 | * Returns the log id property. |
||
345 | * |
||
346 | * @since 4.0 |
||
347 | * |
||
348 | * @return int The log id. |
||
349 | */ |
||
350 | public function get_log_id() { |
||
353 | |||
354 | } |
||
355 |
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..