/**
  * _get_existing_reg_payment_REG_IDs
  *
  * returns a list of registration IDs that the payment is currently related to
  * as recorded in the database
  *
  * @param \EE_Payment $payment
  * @return array
  */
 protected function _get_existing_reg_payment_REG_IDs(EE_Payment $payment)
 {
     static $existing_reg_payment_REG_IDs = null;
     //EEH_Debug_Tools::printr( $existing_reg_payment_REG_IDs, '$existing_reg_payment_REG_IDs', __FILE__, __LINE__ );
     if ($existing_reg_payment_REG_IDs === null) {
         // let's get any existing reg payment records for this payment
         $existing_reg_payment_REG_IDs = $payment->get_many_related('Registration');
         // but we only want the REG IDs, so grab the array keys
         $existing_reg_payment_REG_IDs = !empty($existing_reg_payment_REG_IDs) ? array_keys($existing_reg_payment_REG_IDs) : array();
     }
     //EEH_Debug_Tools::printr( $existing_reg_payment_REG_IDs, '$existing_reg_payment_REG_IDs', __FILE__, __LINE__ );
     return $existing_reg_payment_REG_IDs;
 }
 /**
  * _get_existing_reg_payment_REG_IDs
  *
  * returns a list of registration IDs that the payment is currently related to
  * as recorded in the database
  *
  * @param \EE_Payment $payment
  * @return array
  */
 protected function _get_existing_reg_payment_REG_IDs(EE_Payment $payment)
 {
     if ($this->existing_reg_payment_REG_IDs() === null) {
         // let's get any existing reg payment records for this payment
         $existing_reg_payment_REG_IDs = $payment->get_many_related('Registration');
         // but we only want the REG IDs, so grab the array keys
         $existing_reg_payment_REG_IDs = !empty($existing_reg_payment_REG_IDs) ? array_keys($existing_reg_payment_REG_IDs) : array();
         $this->set_existing_reg_payment_REG_IDs($existing_reg_payment_REG_IDs);
     }
     return $this->existing_reg_payment_REG_IDs();
 }