BraintreeResultSuccessful

Braintree Successful Result.

Defined (1)

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

/includes/lib/Braintree/Braintree/Result/Successful.php  
  1. class Braintree_Result_Successful extends Braintree_Instance 
  2. /** 
  3. * @var boolean always true 
  4. */ 
  5. public $success = true; 
  6. /** 
  7. * @var string stores the internal name of the object providing access to 
  8. */ 
  9. private $_returnObjectName; 
  10.  
  11. /** 
  12. * @ignore 
  13. * @param string $classToReturn name of class to instantiate 
  14. */ 
  15. public function __construct($objToReturn = null) 
  16. if(!empty($objToReturn)) { 
  17. // get a lowercase direct name for the property 
  18. $property = Braintree_Util::cleanClassName( 
  19. get_class($objToReturn) 
  20. ); 
  21. // save the name for indirect access 
  22. $this->_returnObjectName = $property; 
  23.  
  24. // create the property! 
  25. $this->$property = $objToReturn; 
  26.  
  27.  
  28. /** 
  29. * @ignore 
  30. * @return string string representation of the object's structure 
  31. */ 
  32. public function __toString() 
  33. $returnObject = $this->_returnObjectName; 
  34. return __CLASS__ . '['.$this->$returnObject->__toString().']'; 
  35.