public static function Braintree_Util::attributesToString in Commerce Braintree 7
7 calls to Braintree_Util::attributesToString()
- Braintree_Address::__toString in braintree_php/
lib/ Braintree/ Address.php - create a printable representation of the object as: ClassName[property=value, property=value] @ignore
- Braintree_CreditCard::__toString in braintree_php/
lib/ Braintree/ CreditCard.php - create a printable representation of the object as: ClassName[property=value, property=value]
- Braintree_Customer::__toString in braintree_php/
lib/ Braintree/ Customer.php - returns a string representation of the customer
- Braintree_Result_CreditCardVerification::__toString in braintree_php/
lib/ Braintree/ Result/ CreditCardVerification.php - returns a string representation of the customer
- Braintree_Result_Error::__toString in braintree_php/
lib/ Braintree/ Result/ Error.php - create a printable representation of the object as: ClassName[property=value, property=value] @ignore
File
- braintree_php/
lib/ Braintree/ Util.php, line 165
Class
- Braintree_Util
- Braintree Utility methods
Code
public static function attributesToString($attributes) {
foreach ($attributes as $key => $value) {
if (is_array($value)) {
$pAttrib = "";
foreach ($value as $obj) {
$pAttrib .= sprintf('%s', $obj);
}
}
else {
if ($value instanceof DateTime) {
$pAttrib = $value
->format(DateTime::RFC850);
}
else {
$pAttrib = $value;
}
}
$printableAttribs[$key] = sprintf('%s', $pAttrib);
}
return Braintree_Util::implodeAssociativeArray($printableAttribs);
}