/** * Given the list of params in the params array, fetch the object * and store the values in the values array * * @param array $params input parameters to find object * @param array $values output values of the object * @param array $ids the array that holds all the db ids * * @return CRM_Contribute_BAO_Contribution|null the found object or null * @access public * @static */ static function &getValues(&$params, &$values, &$ids) { if (empty($params)) { return null; } $contribution = new CRM_Contribute_BAO_Contribution(); $contribution->copyValues($params); if ($contribution->find(true)) { $ids['contribution'] = $contribution->id; CRM_Core_DAO::storeValues($contribution, $values); return $contribution; } return null; }
/** * Given the list of params in the params array, fetch the object * and store the values in the values array * * @param array $params * Input parameters to find object. * @param array $values * Output values of the object. * @param array $ids * The array that holds all the db ids. * * @return CRM_Contribute_BAO_Contribution|null * The found object or null */ public static function getValues($params, &$values, &$ids) { if (empty($params)) { return NULL; } $contribution = new CRM_Contribute_BAO_Contribution(); $contribution->copyValues($params); if ($contribution->find(TRUE)) { $ids['contribution'] = $contribution->id; CRM_Core_DAO::storeValues($contribution, $values); return $contribution; } $null = NULL; // return by reference return $null; }