public function Braintree_Result_Successful::__construct in Commerce Braintree 7
@ignore
Parameters
string $classToReturn name of class to instantiate:
Overrides Braintree_Instance::__construct
File
- braintree_php/
lib/ Braintree/ Result/ Successful.php, line 51
Class
- Braintree_Result_Successful
- Braintree Successful Result
Code
public function __construct($objToReturn = null) {
if (!empty($objToReturn)) {
// get a lowercase direct name for the property
$property = Braintree_Util::cleanClassName(get_class($objToReturn));
// save the name for indirect access
$this->_returnObjectName = $property;
// create the property!
$this->{$property} = $objToReturn;
}
}