Braintree_Error_Validation

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

Defined (1)

The class is defined in the following location(s).

/classes/lib/Braintree/Braintree/Error/Validation.php  
  1. class Validation 
  2. private $_attribute; 
  3. private $_code; 
  4. private $_message; 
  5.  
  6. /** 
  7. * @ignore 
  8. * @param array $attributes 
  9. */ 
  10. public function __construct($attributes) 
  11. $this->_initializeFromArray($attributes); 
  12. /** 
  13. * initializes instance properties from the keys/values of an array 
  14. * @ignore 
  15. * @access protected 
  16. * @param array $attributes array of properties to set - single level 
  17. * @return void 
  18. */ 
  19. private function _initializeFromArray($attributes) 
  20. foreach($attributes AS $name => $value) { 
  21. $varName = "_$name"; 
  22. $this->$varName = Util::delimiterToCamelCase($value, '_'); 
  23.  
  24. /** 
  25. * @ignore 
  26. */ 
  27. public function __get($name) 
  28. $varName = "_$name"; 
  29. return isset($this->$varName) ? $this->$varName : null;