OAuthResult.php 721 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace Braintree;
  3. /**
  4. * Braintree OAuthCredentials module
  5. *
  6. * @package Braintree
  7. * @category Resources
  8. */
  9. class OAuthResult extends Base
  10. {
  11. protected function _initialize($attribs)
  12. {
  13. $this->_attributes = $attribs;
  14. }
  15. public static function factory($attributes)
  16. {
  17. $instance = new self();
  18. $instance->_initialize($attributes);
  19. return $instance;
  20. }
  21. /**
  22. * returns a string representation of the result
  23. * @return string
  24. */
  25. public function __toString()
  26. {
  27. return __CLASS__ . '[' .
  28. Util::attributesToString($this->_attributes) .']';
  29. }
  30. }
  31. class_alias('Braintree\OAuthResult', 'Braintree_OAuthResult');