Skip to content
This repository has been archived by the owner on Sep 30, 2020. It is now read-only.

Commit

Permalink
Merge branch 'fattmerchantorg-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
tuurbo committed Dec 2, 2016
2 parents 6ac5bdd + f21e95e commit a4beecc
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/Spreedly.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,26 @@ public function setConfig(array $config)
return $this;
}

/**
* Merge config.
*
* Given an array of configs, they will be merged into the existing config
* instead of replacing them completely
* The supplied configs are given priority.
*
* @param array $config
*
* @return $this
*/
public function mergeConfig(array $config)
{
$this->config = array_merge($this->config ?: [], $config);

$this->validateConfig();

return $this;
}

/**
* Check config for required params.
*/
Expand Down

0 comments on commit a4beecc

Please sign in to comment.