Braintree\Customer::factory PHP Method

factory() public static method

factory method: returns an instance of Customer to the requesting method, with populated properties
public static factory ( array $attributes ) : Customer
$attributes array
return Customer
    public static function factory($attributes)
    {
        $instance = new Customer();
        $instance->_initialize($attributes);
        return $instance;
    }

Usage Example

示例#1
0
 public function testGet_givesErrorIfInvalidProperty()
 {
     $this->setExpectedException('PHPUnit_Framework_Error', 'Undefined property on Braintree\\Customer: foo');
     $c = Braintree\Customer::factory([]);
     $c->foo;
 }
All Usage Examples Of Braintree\Customer::factory