summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArjan Keeman <akeeman@users.noreply.github.com>2016-09-22 10:45:27 +0200
committerGitHub <noreply@github.com>2016-09-22 10:45:27 +0200
commit18415fc7eef5ce2e3d16ba8b9c4077ad7cc630f3 (patch)
tree97719c8646277aab6d9659b3464eba1377ff10fc
parent137c48baecd8870349a08c010c1a855578db7817 (diff)
downloadphp-http-client-18415fc7eef5ce2e3d16ba8b9c4077ad7cc630f3.zip
php-http-client-18415fc7eef5ce2e3d16ba8b9c4077ad7cc630f3.tar.gz
php-http-client-18415fc7eef5ce2e3d16ba8b9c4077ad7cc630f3.tar.bz2
Increase testability by providing getters.
-rw-r--r--lib/Client.php32
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/Client.php b/lib/Client.php
index c14344a..d5f997b 100644
--- a/lib/Client.php
+++ b/lib/Client.php
@@ -48,6 +48,38 @@ class Client
// These are the supported HTTP verbs
$this->methods = ['delete', 'get', 'patch', 'post', 'put'];
}
+
+ /**
+ * @return string
+ */
+ public function getHost()
+ {
+ return $this->host;
+ }
+
+ /**
+ * @return array
+ */
+ public function getHeaders()
+ {
+ return $this->headers;
+ }
+
+ /**
+ * @return string|null
+ */
+ public function getVersion()
+ {
+ return $this->version;
+ }
+
+ /**
+ * @return array
+ */
+ public function getPath()
+ {
+ return $this->path;
+ }
/**
* Make a new Client object