Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
default_delivery_method.inc
1 <?php
14 require_once SQ_PACKAGES_PATH.'/ecommerce/delivery_methods/ecommerce_delivery_method/ecommerce_delivery_method.inc';
15 require_once SQ_LIB_PATH.'/html_form/html_form.inc';
16 require_once SQ_LIB_PATH.'/xml_array/xml_array.inc';
17 require_once SQ_FUDGE_PATH.'/general/www.inc';
18 require_once SQ_PACKAGES_PATH.'/ecommerce/lib/ecommerce_cart_processor.inc';
19 
20 
32 {
33 
34 
35  function Default_Delivery_Method($assetid=0)
36  {
37  $this->_ser_attrs = TRUE;
38  $this->Ecommerce_Delivery_Method($assetid);
39 
40  }//end constructor
41 
42 
51  function _createAdditional(&$link)
52  {
53  if (!parent::_createAdditional($link)) return FALSE;
54 
55  $sub_assets = Array(
56  'form' => Array(
57  'type_code' => 'simple_form',
58  'name' => 'Form Contents',
59  'link_type' => SQ_LINK_TYPE_2,
60  'exclusive' => FALSE,
61  ),
62  'bodycopies' => Array(
63  'type_code' => 'folder',
64  'name' => 'Bodycopies',
65  'link_type' => SQ_LINK_TYPE_2,
66  'exclusive' => TRUE,
67  ),
68  );
69 
70  $success = TRUE;
71  $bodycopy_folder = NULL;
72  foreach ($sub_assets as $link_value => $sub_asset) {
73  $asset_type = $sub_asset['type_code'];
74  $GLOBALS['SQ_SYSTEM']->am->includeAsset($asset_type);
75 
76  $asset = new $asset_type();
77  $copy_link = Array(
78  'asset' => &$this,
79  'value' => $link_value,
80  'link_type' => $sub_asset['link_type'],
81  'is_dependant' => 1,
82  'is_exclusive' => $sub_asset['exclusive'],
83  );
84 
85  $asset->setAttrValue('name', $sub_asset['name']);
86  $success = $asset->create($copy_link);
87 
88  if ($link_value == 'bodycopies') {
89  $bodycopy_folder = $asset;
90  }
91 
92  $GLOBALS['SQ_SYSTEM']->am->forgetAsset($asset);
93  unset($asset);
94 
95  if (!$success) break;
96  }
97 
98  // now create bodycopies
99  if ($success) {
100  $GLOBALS['SQ_SYSTEM']->am->includeAsset('bodycopy');
101  foreach ($this->getAvailableBodycopies() as $link_value => $bodycopy_name) {
102  $asset = new Bodycopy();
103 
104  $copy_link = Array(
105  'asset' => &$bodycopy_folder,
106  'value' => $link_value,
107  'link_type' => SQ_LINK_TYPE_2,
108  'is_dependant' => 1,
109  'is_exclusive' => 1,
110  );
111 
112  $asset->setAttrValue('name', $bodycopy_name);
113 
114  $success = $asset->create($copy_link);
115  unset($asset);
116  if (!$success) break;
117  }
118  }
119 
120  return TRUE;
121 
122  }//end _createAdditional()
123 
124 
132  {
133  $bodycopy =& $this->getBodycopy('confirmation');
134 
135  // get an array with all the values entered by the user
136  $form_values = unserialize($_SESSION['order_extra_information']);
137 
138  // create the replacement keyword array
139  $keyword_remplacements = Array();
140 
141  // get all the keywords from the bodycopy
142  $confirmation_keywords = $bodycopy->getKeywords();
143 
144  // create the keyword replacements with values entered by the user
145  foreach ($confirmation_keywords as $keyword) {
146  $key_parts = explode('_', $keyword);
147  if ((count($key_parts) == 2 ) && ($key_parts[0] == 'form')) {
148 
149  $keyword_remplacements[$keyword] = $form_values[$key_parts[1]];
150  }
151  }
152  $bodycopy->setKeywordReplacements($keyword_remplacements);
153 
154  ob_start();
155  $bodycopy->printBody();
156  $contents = ob_get_contents();
157  ob_end_clean();
158 
159  return $contents;
160 
161  }//end getConfirmationSummary()
162 
163 
173  function onRequestKeywords(&$broadcaster, $vars=Array())
174  {
175  $keywords = Array();
176 
177  if (!is_array($vars['keywords'])) {
178  $vars['keywords'] = Array();
179  }
180 
181  $bodycopy_folder_link = $GLOBALS['SQ_SYSTEM']->am->getLink($this->id, SQ_LINK_TYPE_2, 'folder', TRUE, 'bodycopies');
182  // not our bodycopy, just bail out
183  if (empty($bodycopy_folder_link)) {
184  return;
185  } else {
186  $bodycopy_folder_id = $bodycopy_folder_link['minorid'];
187  }
188 
189  $broadcaster_parents = $GLOBALS['SQ_SYSTEM']->am->getParents($broadcaster->id, 'bodycopy', TRUE);
190  $content_bodycopy_value = NULL;
191  foreach (array_keys($broadcaster_parents) as $bodycopy_id) {
192  $content_bodycopy_link = $GLOBALS['SQ_SYSTEM']->am->getLinkByAsset($bodycopy_folder_id, $bodycopy_id);
193  if (!empty($content_bodycopy_link) && !empty($content_bodycopy_link['value'])) {
194  $bodycopy_context = $content_bodycopy_link['value'];
195  break;
196  }
197  }
198 
199  // check if the found bodycopy context is recognised
200  $contexts = $this->getAvailableBodycopies();
201  if (empty($bodycopy_context) || !isset($contexts[$bodycopy_context])) {
202  return;
203  }
204 
205  require_once SQ_FUDGE_PATH.'/general/text.inc';
206 
207  $context_kw_fn = '_get'.ucwords_no_space($bodycopy_context).'BodycopyKeywords';
208  if (method_exists($this, $context_kw_fn)) {
209  $vars['keywords'] = array_merge($vars['keywords'], $this->$context_kw_fn());
210  }
211 
212  }//end onRequestKeywords()
213 
214 
222  {
223  $keywords = Array();
224  $form =& $this->getForm();
225 
226  $question_values = $form->getQuestions();
227  foreach ($question_values as $key => $value) {
228  $key_parts = explode( ':', $key);
229  $keywords['form_'.$key_parts[1]] = $value['name'].' ('.$key_parts[1].')';
230  }
231  return $keywords;
232 
233  }//end _getConfirmationBodycopyKeywords()
234 
235 
243  {
244  $keywords = Array();
245  $form =& $this->getForm();
246 
247  $question_values = $form->getQuestions();
248  foreach ($question_values as $key => $value) {
249  $key_parts = explode( ':', $key);
250  $keywords['form_'.$key_parts[1]] = $value['name'].' ('.$key_parts[1].')';
251  }
252  return $keywords;
253 
254  }//end _getSuccessBodycopyKeywords()
255 
256 
264  {
265  $keywords = Array();
266  $form =& $this->getForm();
267 
268  $question_values = $form->getQuestions();
269  foreach ($question_values as $key => $value) {
270  $key_parts = explode( ':', $key);
271  $keywords['form_'.$key_parts[1]] = $value['name'].' ('.$key_parts[1].')';
272  }
273  return $keywords;
274 
275  }//end _getFailureBodycopyKeywords()
276 
277 
284  function _getAllowedLinks()
285  {
286  $links = parent::_getAllowedLinks();
287  $links[SQ_LINK_TYPE_2] = Array(
288  'simple_form' => Array(
289  'card' => '1',
290  'exclusive' => FALSE,
291  ),
292  'folder' => Array(
293  'card' => '1',
294  'exclusive' => TRUE,
295  ),
296  );
297 
298  return $links;
299 
300  }//end _getAllowedLinks()
301 
302 
312  {
313  switch ($type) {
314  case('form_question_type_text'):
315  case('form_question_type_numeric'):
316  case('form_question_type_email_address'):
317  case('form_question_type_select'):
318  case('form_question_type_option_list'):
319  case('form_question_type_tickbox_list'):
320  case('form_question_type_tickbox_table'):
321  case('form_question_type_country'):
322  return TRUE;
323 
324  default:
325  return FALSE;
326  }
327 
328  }//end _isAllowedPassThroughQuestionType()
329 
330 
338  {
339  $xml_str = '';
340 
341  $form =& $this->getForm();
342  $questions = $form->getQuestions();
343  $answers = unserialize($_SESSION['order_extra_information']);
344 
345  foreach ($questions as $q_id => $question_data) {
346  $id_parts = explode(':', $q_id);
347  $answer = array_get_index($answers, $id_parts[1], '');
348 
349  $xml_str .= <<<HEREDOC
350 
351  <question>
352  <id><![CDATA[$q_id]]></id>
353  <name><![CDATA[{$question_data['name']}]]></name>
354  <answer><![CDATA[$answer]]></answer>
355  </question>
356 HEREDOC;
357  }
358 
359  $xml_str = <<<HEREDOC
360  <delivery_method>
361  <questions>$xml_str
362  </questions>
363  </delivery_method>
364 HEREDOC;
365 
366  return $xml_str;
367 
368  }//end getDeliveryMethodXML()
369 
370 
379  function getReceipt($html=FALSE)
380  {
381  ob_start();
382  if ($html) echo '<pre><ul>';
383 
384  $form =& $this->getForm();
385  $question_values = $form->getQuestions();
386  $answers = unserialize($_SESSION['order_extra_information']);
387  foreach ($question_values as $key => $value) {
388  $key_parts = explode(':', $key);
389  if ($html) {
390  echo '<li>'.$value['name'].' ('.$key_parts[1].') : '.$answers[$key_parts[1]].'</li>';
391  } else {
392  echo $value['name'].' ('.$key_parts[1].') : '.$answers[$key_parts[1]]."\n";
393  }
394  }
395 
396  if ($html) echo '</ul></pre>';
397 
398  $receipt = ob_get_contents();
399  ob_end_clean();
400 
401  return $receipt;
402 
403  }//end getReceipt()
404 
405 
412  function getReceiptSummary()
413  {
414  $transaction_id = 0;
415  $bodycopy =& $this->getBodycopy('success');
416 
417  $bodycopy->setKeywordReplacements($this->_getReceiptKeywordReplacements());
418 
419  // if the order id is not empty get the asset and get the form values entered from the user
420  if (!empty($this->state['transaction_id'])) {
421  $tmp_order = $GLOBALS['SQ_SYSTEM']->am->getAsset($this->state['transaction_id']);
422  $transaction_id = $this->state['transaction_id'];
423  // get the keywords from the bodycopy and replace them with the values entered by the user
424  $keywords = $bodycopy->getKeywords();
425  $form_values = $tmp_order->attr('order_form_value');
426  $keyword_replacements = Array();
427  foreach ($keywords as $keyword) {
428  $key_parts = explode('_', $keyword);
429  if ((count($key_parts) == 2) && ($key_parts[0] == 'form')) {
430  $keyword_replacements[$keyword] = $form_values[$key_parts[1]];
431  }
432  }
433  $bodycopy->setKeywordReplacements($keyword_replacements);
434 
435  }
436 
437 
438  ob_start();
439  if (!empty($transaction_id)) {
440  echo '<p id="order_id"><span id="order_id_title">Order ID:</span> '.$transaction_id.'</p>';
441  }
442  $bodycopy->printBody();
443  $contents = ob_get_contents();
444  ob_end_clean();
445 
446  return $contents;
447 
448  }//end getReceiptSummary()
449 
450 
458  {
459  $keywords = Array();
460  return $keywords;
461 
462  }//end _getReceiptKeywordReplacements()
463 
464 
472  {
473  return Array(
474  'success' => 'Success',
475  'failure' => 'Failure',
476  'confirmation' => 'Confirmation',
477  );
478 
479  }//end getAvailableBodycopies()
480 
481 
488  function getInputInterface()
489  {
490  $interface = parent::getInputInterface();
491 
492  $form =& $this->getForm();
493 
494  ob_start();
495  $form->printBody(FALSE, FALSE);
496  $contents = ob_get_contents();
497  ob_end_clean();
498 
499  return $contents;
500 
501  }//end getInputInterface()
502 
503 
511  {
512  $form =& $this->getForm();
513  $state = $this->getState();
514 
515  $ok = $form->process();
516 
517  // add the form values entered by the user in a session variable
518  $question_values = $form->getQuestions();
519  $answers = $form->getAnswers();
520  $order_extra_info = Array();
521  foreach ($question_values as $key => $value) {
522  $tmp_value = '';
523  if (!empty($answers[$key]['summary'])) {
524  $tmp_value = $answers[$key]['summary'];
525  } else if (!empty($answers[$key]['value'])) {
526  $tmp_value = $answers[$key]['value'];
527  }
528  $key_parts = explode(':', $key);
529  $order_extra_info[$key_parts[1]] = $tmp_value;
530  //if the question is a country question, stores the value for pass-through variables later
531  if ($answers[$key]['type_code'] == 'form_question_type_country') {
532  $order_extra_info[$key] = $answers[$key]['value'];
533  }
534  }
535 
536  $_SESSION['order_extra_information'] = serialize($order_extra_info);
537 
538  if (!$ok) {
539  return FALSE;
540  } else {
541  return $answers;
542  }
543 
544  }//end processInputInterface()
545 
546 
553  function getErrors()
554  {
555  $form =& $this->getForm();
556  return $form->getErrors();
557 
558  }//end getErrors()
559 
560 
567  function &getForm()
568  {
569  if (empty($this->_tmp['form'])) {
570  $this->_tmp['form'] = NULL;
571 
572  $form_link = $GLOBALS['SQ_SYSTEM']->am->getLink($this->id, SQ_LINK_TYPE_2, 'simple_form', TRUE, 'form');
573  if ($form_link) {
574  $this->_tmp['form'] = $GLOBALS['SQ_SYSTEM']->am->getAsset($form_link['minorid'], 'simple_form');
575  }
576  }
577 
578  return $this->_tmp['form'];
579 
580  }//end getForm()
581 
582 
589  function getStatusMessage()
590  {
591  switch ($status) {
592  case 0:
593  return 'Processing';
594  break;
595 
596  case 1:
597  return 'Sent to mail server';
598  break;
599 
600  case 2:
601  default:
602  return 'Failed';
603  break;
604  }
605 
606  }//end getStatusMessage()
607 
608 
615  function validateState()
616  {
617  $state = $this->getState();
618  return TRUE;
619 
620  }//end validateState()
621 
622 
629  function getFailureSummary()
630  {
631  $bodycopy =& $this->getBodycopy('failure');
632 
633  ob_start();
634  $bodycopy->printBody();
635  $contents = ob_get_contents();
636  ob_end_clean();
637 
638  return $contents;
639 
640  }//end getFailureSummary()
641 
642 
651  function &getBodycopy($name='')
652  {
653  $null = NULL;
654  if (!$name) return $null;
655  $am =& $GLOBALS['SQ_SYSTEM']->am;
656 
657  $folder_link = $GLOBALS['SQ_SYSTEM']->am->getLink($this->id, SQ_LINK_TYPE_2, 'folder', TRUE, 'bodycopies');
658  if (empty($folder_link)) return $null;
659 
660  $folder = $am->getAsset($folder_link['minorid'], $folder_link['minor_type_code']);
661  if (is_null($folder)) return $null;
662 
663  $bodycopy_link = $GLOBALS['SQ_SYSTEM']->am->getLink($folder->id, SQ_LINK_TYPE_2, 'bodycopy', TRUE, $name);
664  if (empty($bodycopy_link)) return $null;
665 
666  $bodycopy = $am->getAsset($bodycopy_link['minorid'], $bodycopy_link['minor_type_code']);
667 
668  if (!empty($bodycopy)) return $bodycopy;
669 
670  return NULL;
671 
672  }//end getBodycopy()
673 
674 
692  function processDelivery(&$order, &$contents_bodycopy, &$format_bodycopy, $currency_symbol='$', $float_precision=2, $taxation_name='GST', $taxation_rate=0.0, $flat_charges=Array(), $neg_quantity_list='', $neg_quantity_message='')
693  {
694  $this->state['transaction_id'] = $order->id;
695 
696  $order->setOrderStatus(SQ_ECOM_ORDER_STATUS_PROCESSING, 'Pending');
697 
698  if ($this->attr('send_emails')) {
699  $email_receipt_attr = $this->getAttribute('receipt_emails_format');
700  $email_recipient_attr = $this->getAttribute('recipient_emails_format');
701 
702  $receipt_value = @unserialize($email_receipt_attr->value);
703  $recipient_value = @unserialize($email_recipient_attr->value);
704 
705  // get all the keyword replacements
706  $keywords_replacements = Array();
707  $keywords_to_replace = Array();
708 
709  // get order id keyword replacements
710  $keywords_to_replace[] = 'order_id';
711  $keywords_replacements[] = $this->state['transaction_id'];
712 
713  // get transaction reference id keyword replacements
714  $keywords_to_replace[] = 'transaction_id';
715  $keywords_replacements[] = $order->attr('transaction_id');
716 
717  // get merchant transaction reference id keyword replacements
718  $keywords_to_replace[] = 'merchant_transaction_id';
719  $keywords_replacements[] = $order->attr('ecom_ref_no');
720 
721  // get keyword replacements for order receipt
722  $keywords_to_replace[] = 'order_receipt';
723 
724  // get the order summary from the cart
725  $cart = new Ecommerce_Cart_Processor();
726  $cart->setCartContainer($_SESSION['sq_local_cart_contents']['cart_contents']);
727  $tmp_order_receipt_cart = '<pre>';
728  $tmp_order_receipt_cart_text = '';
729  ob_start();
730  echo 'Order ID: '.$this->state['transaction_id']."\n\n";
731 
732  $remove_tax = isset($_SESSION['sq_region_specific']['remove_tax']) ? $_SESSION['sq_region_specific']['remove_tax'] : FALSE;
733  $cart->printReceipt($taxation_name, $taxation_rate, $flat_charges, $remove_tax, $currency_symbol, $float_precision);
734 
735  $tmp_order_receipt_cart_text .= ob_get_contents();
736  ob_end_clean();
737  $tmp_order_receipt_cart .= $tmp_order_receipt_cart_text.'</pre>';
738 
739  // get the form summary
740  $tmp_order_receipt_form = '<pre>'.$this->getReceipt(TRUE).'</pre>';
741  $keywords_replacements[] = $tmp_order_receipt_cart.$tmp_order_receipt_form;
742 
743  // get keyword replacements for cart summary
744  $keywords_to_replace[] = 'cart_summary';
745  $keywords_replacements[] = $tmp_order_receipt_cart;
746 
747  $keywords_to_replace[] = 'cart_summary_text';
748  $keywords_replacements[] = $tmp_order_receipt_cart_text;
749 
750  // get keyword replacements for customised receipt
751  if (!is_null($contents_bodycopy) && !is_null($format_bodycopy)) {
752  $keywords_to_replace[] = 'customised_receipt';
753  $keywords_replacements[] = $cart->printCustomisedReceipt($contents_bodycopy, $format_bodycopy, $taxation_name, $taxation_rate, $flat_charges, $remove_tax, $currency_symbol, $float_precision);
754  }
755 
756  // get keyword replacements for form summary
757  $keywords_to_replace[] = 'form_summary';
758  $keywords_replacements[] = $tmp_order_receipt_form;
759 
760  $keywords_to_replace[] = 'form_summary_text';
761  $keywords_replacements[] = $this->getReceipt(FALSE);
762 
763  // get negative quantities replacements
764  // used only if payment gateway is processed and there is not enough product quantity before payment goes through
765  $keywords_to_replace[] = 'negative_quantity_product_list';
766  $keywords_replacements[] = $neg_quantity_list;
767  $keywords_to_replace[] = 'negative_quantity_message';
768  $keywords_replacements[] = $neg_quantity_message;
769 
770  // add replacements for form questions
771  $form_values = unserialize($_SESSION['order_extra_information']);
772  $tmp_form =& $this->getForm();
773  $tmp_questions = $tmp_form->getQuestions();
774  foreach ($tmp_questions as $key => $value) {
775  $key_parts = explode(':', $key);
776  $keywords_to_replace[] = 'response_'.$key_parts[1].'';
777  if (!empty($form_values[$key_parts[1]])) {
778  $keywords_replacements[] = $form_values[$key_parts[1]];
779  } else {
780  $keywords_replacements[] = '';
781  }
782  }
783 
784  // create the keyword replacement array
785  $send_mail_replacements = Array();
786  for ($i = 0; $i < count($keywords_to_replace); $i++) {
787  $send_mail_replacements = array_merge($send_mail_replacements, Array($keywords_to_replace[$i] => $keywords_replacements[$i]));
788  }
789 
790  // send emails if we need to
791  $email_recipient_attr->sendMail($send_mail_replacements);
792  $email_receipt_attr->sendMail($send_mail_replacements);
793  }//end if
794 
795  $success = TRUE;
796 
797  if ($success) {
798  $order->setOrderStatus(SQ_ECOM_ORDER_STATUS_SUCCESS);
799  } else {
800  $order->setOrderStatus(SQ_ECOM_ORDER_STATUS_FAILED);
801  }
802  $order->setAttrValue('order_form_value', unserialize($_SESSION['order_extra_information']));
803 
804  return TRUE;
805 
806  }//end processDelivery()
807 
808 
818  function processPaymentGateway($total_cost)
819  {
820  $gateway_asset =& $GLOBALS['SQ_SYSTEM']->am->getAsset($this->attr('payment_gateway'));
821  $gateway_asset_url = $gateway_asset->getURL();
822  // set up expected session vars
823  $_SESSION['SQ_ECOM_AMOUNT'] = $total_cost;
824  // get checkout asset URL
825  $checkout_link = $GLOBALS['SQ_SYSTEM']->am->getLink($this->id, SQ_LINK_NOTICE, 'ecommerce_checkout', TRUE, 'delivery_method', 'minor');
826  $checkout_url = $GLOBALS['SQ_SYSTEM']->am->getAssetURL($checkout_link['majorid']);
827  $checkout =& $GLOBALS['SQ_SYSTEM']->am->getAsset($checkout_link['majorid']);
828 
829  $_SESSION['SQ_ECOM_SUCCESS_URL'] = $checkout_url.'?'.$checkout->getPrefix().'_action=payment_gateway_successful';
830  $_SESSION['SQ_ECOM_CANCEL_URL'] = $checkout_url.'?'.$checkout->getPrefix().'_action=return_to_checkout';
831  $_SESSION['SQ_ECOM_REF_NO'] = md5(session_id().time());
832 
833  //Add the pass through variables to SESSION variables
834  $pass_through_vars = $this->_getPassThroughVars();
835  if (!empty($pass_through_vars)) {
836  $_SESSION['SQ_ECOM_PASS_THROUGH_VARS'] = $pass_through_vars;
837  }
838 
839  $pending_order_id = array_get_index($_SESSION['sq_local_cart_contents'], 'pending_order_id', NULL);
840  $pending_order = $GLOBALS['SQ_SYSTEM']->am->getAsset($_SESSION['sq_local_cart_contents']['pending_order_id']);
841 
842  $pending_order->setAttrValue('ecom_ref_no', $_SESSION['SQ_ECOM_REF_NO']);
843  $pending_order->appendAuditLog(translate('ecom_ref_num_recorded_before_processing'));
844 
845  header('Location: '.$gateway_asset_url);
846 
847  }//end processPaymentGateway()
848 
849 
857  {
858  $key_val_arr = Array();
859  $var_rules = $this->attr('key_val_rules');
860  if (empty($var_rules)) {
861  return $key_val_arr;
862  }
863 
864  //get Asset Manager
865  $am =& $GLOBALS['SQ_SYSTEM']->am;
866 
867  //get the current answers entered by the user
868  $current_answers = unserialize($_SESSION['order_extra_information']);
869 
870  $form =& $this->getForm();
871  $questions = $form->getQuestions();
872  foreach ($questions as $q_id => $question_data) {
873  if (key_exists($q_id, $var_rules)) {
874  $var_rule = $var_rules[$q_id];
875  $key = array_get_index($var_rule, 'key', '');
876  if (trim($key) == '') {
877  continue;
878  }
879 
880  $val = '';
881  $question = $am->getAsset($q_id);
882  if ($question instanceof Form_Question_Type_Country) {
883  $val = $current_answers[$q_id];
884  } else if ($question->isSelection()) {
885  $options = array_get_index($var_rule, 'value', Array());
886  foreach ($options as $option_id => $option_val) {
887  //if option is selcted and option is not --leave empty--
888  if ($question->isSelected($option_id) && (!($question instanceof Form_question_type_select) || !$question->isEmptyOption($option_id))) {
889  $val = $option_val;
890  break;
891  }
892  }
893  } else {
894  $key_parts = explode(':', $q_id);
895  if (!empty($current_answers[$key_parts[1]])) {
896  $val = $current_answers[$key_parts[1]];
897  }
898  }
899 
900  $key_val_arr[$key] = $val;
901  }//end if
902  }//end for
903 
904  return $key_val_arr;
905 
906  }//end _getPassThroughVars()
907 
908 
909 }//end class
910 
911 ?>