diff options
author | rajumsys <mohammad.hossain@sparkpost.com> | 2017-03-08 10:07:51 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-08 10:07:51 -0500 |
commit | 3716c6aec91766fa941f2fe3369c8d62db000fa8 (patch) | |
tree | 1c6190ba0a2a287061789424589547f985353c3d /lib/SparkPost | |
parent | 0c45993ee9d68d47acbd04b241c8b24b8667f937 (diff) | |
parent | e9419a0b71b2bfbe0dd097f03b71da1294984885 (diff) | |
download | php-sparkpost-3716c6aec91766fa941f2fe3369c8d62db000fa8.zip php-sparkpost-3716c6aec91766fa941f2fe3369c8d62db000fa8.tar.gz php-sparkpost-3716c6aec91766fa941f2fe3369c8d62db000fa8.tar.bz2 |
Merge pull request #149 from zaporylie/patch-2
Setters should return current object.
Diffstat (limited to 'lib/SparkPost')
-rw-r--r-- | lib/SparkPost/SparkPost.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/SparkPost/SparkPost.php b/lib/SparkPost/SparkPost.php index 00b3d6f..05be7f4 100644 --- a/lib/SparkPost/SparkPost.php +++ b/lib/SparkPost/SparkPost.php @@ -242,6 +242,8 @@ class SparkPost * Sets $httpClient to be used for request. * * @param HttpClient|HttpAsyncClient $httpClient - the client to be used for request + * + * @return SparkPost */ public function setHttpClient($httpClient) { @@ -250,12 +252,16 @@ class SparkPost } $this->httpClient = $httpClient; + + return $this; } /** * Sets the options from the param and defaults for the SparkPost object. * * @param array $options - either an string API key or an array of options + * + * @return SparkPost */ public function setOptions($options) { @@ -277,6 +283,8 @@ class SparkPost $this->options[$option] = $value; } } + + return $this; } /** |