You are here

private function Braintree_Error_Validation::_initializeFromArray in Commerce Braintree 7

initializes instance properties from the keys/values of an array @ignore @access protected

Parameters

array $attributes array of properties to set - single level:

Return value

none

1 call to Braintree_Error_Validation::_initializeFromArray()
Braintree_Error_Validation::__construct in braintree_php/lib/Braintree/Error/Validation.php
@ignore

File

braintree_php/lib/Braintree/Error/Validation.php, line 47

Class

Braintree_Error_Validation
error object returned as part of a validation error collection provides read-only access to $attribute, $code, and $message

Code

private function _initializeFromArray($attributes) {
  foreach ($attributes as $name => $value) {
    $varName = "_{$name}";
    $this->{$varName} = Braintree_Util::delimiterToCamelCase($value, '_');
  }
}