private static function Braintree_TransparentRedirect::_underscoreKeys in Commerce Braintree 7
1 call to Braintree_TransparentRedirect::_underscoreKeys()
- Braintree_TransparentRedirect::_data in braintree_php/
lib/ Braintree/ TransparentRedirect.php - @ignore
File
- braintree_php/
lib/ Braintree/ TransparentRedirect.php, line 300
Class
- Braintree_TransparentRedirect
- Static class providing methods to build Transparent Redirect urls
Code
private static function _underscoreKeys($array) {
foreach ($array as $key => $value) {
$newKey = Braintree_Util::camelCaseToDelimiter($key, '_');
unset($array[$key]);
if (is_array($value)) {
$array[$newKey] = self::_underscoreKeys($value);
}
else {
$array[$newKey] = $value;
}
}
return $array;
}