public function __toString() { $display = array('amount', 'reason', 'status', 'replyByDate', 'receivedDate', 'currencyIsoCode'); $displayAttributes = array(); foreach ($display as $attrib) { $displayAttributes[$attrib] = $this->{$attrib}; } return __CLASS__ . '[' . Braintree_Util::attributesToString($displayAttributes) . ']'; }
public function __toString() { $display = array('id', 'merchantAccountDetails', 'exceptionMessage', 'amount', 'disbursementDate', 'followUpAction', 'retry', 'success', 'transactionIds'); $displayAttributes = array(); foreach ($display as $attrib) { $displayAttributes[$attrib] = $this->{$attrib}; } return __CLASS__ . '[' . Braintree_Util::attributesToString($displayAttributes) . ']'; }
/** * returns a string representation of the customer * @return string */ public function __toString() { $excludedAttributes = array('statusHistory'); $displayAttributes = array(); foreach ($this->_attributes as $key => $val) { if (!in_array($key, $excludedAttributes)) { $displayAttributes[$key] = $val; } } return __CLASS__ . '[' . Braintree_Util::attributesToString($displayAttributes) . ']'; }
/** * create a printable representation of the object as: * ClassName[property=value, property=value] * @return string */ public function __toString() { return __CLASS__ . '[' . Braintree_Util::attributesToString($this->_attributes) . ']'; }
/** * returns a string representation of the transaction * @return string */ public function __toString() { // array of attributes to print $display = array('id', 'type', 'amount', 'status', 'createdAt', 'creditCardDetails', 'customerDetails'); $displayAttributes = array(); foreach ($display as $attrib) { $displayAttributes[$attrib] = $this->{$attrib}; } return __CLASS__ . '[' . Braintree_Util::attributesToString($displayAttributes) . ']'; }
public static function attributesToString($attributes) { $printableAttribs = array(); foreach ($attributes as $key => $value) { if (is_array($value)) { $pAttrib = Braintree_Util::attributesToString($value); } else { if ($value instanceof DateTime) { $pAttrib = $value->format(DateTime::RFC850); } else { $pAttrib = $value; } } $printableAttribs[$key] = sprintf('%s', $pAttrib); } return Braintree_Util::implodeAssociativeArray($printableAttribs); }
public function __toString() { return get_called_class() . '[' . Braintree_Util::attributesToString($this->_attributes) . ']'; }
/** * create a printable representation of the object as: * ClassName[property=value, property=value] * @ignore * @return var */ public function __toString() { $output = Braintree_Util::attributesToString($this->_attributes); if (isset($this->_creditCardVerification)) { $output .= sprintf('%s', $this->_creditCardVerification); } return __CLASS__ . '[' . $output . ']'; }