public function __construct($config) { if (is_array($config)) { $config = new Braintree_Configuration($config); } $config->assertValid(); $this->config = $config; }