123456789101112131415161718192021222324252627282930313233343536 |
- <?php
- namespace Braintree;
- class Merchant extends Base
- {
- protected function _initialize($attribs)
- {
- $this->_attributes = $attribs;
- $merchantAccountArray = [];
- if (isset($attribs['merchantAccounts'])) {
- foreach ($attribs['merchantAccounts'] AS $merchantAccount) {
- $merchantAccountArray[] = MerchantAccount::factory($merchantAccount);
- }
- }
- $this->_set('merchantAccounts', $merchantAccountArray);
- }
- public static function factory($attributes)
- {
- $instance = new self();
- $instance->_initialize($attributes);
- return $instance;
- }
- /**
- * returns a string representation of the merchant
- * @return string
- */
- public function __toString()
- {
- return __CLASS__ . '[' .
- Util::attributesToString($this->_attributes) .']';
- }
- }
- class_alias('Braintree\Merchant', 'Braintree_Merchant');
|