public static function Braintree_Util::delimiterToCamelCase in Commerce Braintree 7
convert alpha-beta-gamma to alphaBetaGamma
@access public
Parameters
string $string:
Return value
string modified string
6 calls to Braintree_Util::delimiterToCamelCase()
- Braintree_Error_ErrorCollection::onHtmlField in braintree_php/
lib/ Braintree/ Error/ ErrorCollection.php - return errors for the passed html field. For example, $result->errors->onHtmlField("transaction[customer][last_name]")
- Braintree_Error_Validation::_initializeFromArray in braintree_php/
lib/ Braintree/ Error/ Validation.php - initializes instance properties from the keys/values of an array @ignore @access protected
- Braintree_Result_Error::valueForHtmlField in braintree_php/
lib/ Braintree/ Result/ Error.php - return original value for a field For example, if a user tried to submit 'invalid-email' in the html field transaction[customer][email], $result->valueForHtmlField("transaction[customer][email]") would yield…
- Braintree_SettlementBatchSummary::_underscoreCustomField in braintree_php/
lib/ Braintree/ SettlementBatchSummary.php - Braintree_Xml_Parser::arrayFromXml in braintree_php/
lib/ Braintree/ Xml/ Parser.php - sets up the SimpleXMLIterator and starts the parsing @access public
File
- braintree_php/
lib/ Braintree/ Util.php, line 117
Class
- Braintree_Util
- Braintree Utility methods
Code
public static function delimiterToCamelCase($string, $delimiter = '[\\-\\_]') {
return preg_replace('/' . $delimiter . '(\\w)/e', 'strtoupper("$1")', $string);
}