diff options
author | Avi Goldman <avrahamymgoldman@gmail.com> | 2016-06-22 11:44:41 -0400 |
---|---|---|
committer | Avi Goldman <avrahamymgoldman@gmail.com> | 2016-06-22 11:44:41 -0400 |
commit | d7f6b4b22e569ed0da339a9228f4202304fe7a05 (patch) | |
tree | 8f4da3d82e2b3eca9d60131ec768f3a5065382b9 /lib/SparkPost/Resource.php | |
parent | 9f86fd39e85e7d3736b9b5c7ea5e95f5129773f4 (diff) | |
download | php-sparkpost-d7f6b4b22e569ed0da339a9228f4202304fe7a05.zip php-sparkpost-d7f6b4b22e569ed0da339a9228f4202304fe7a05.tar.gz php-sparkpost-d7f6b4b22e569ed0da339a9228f4202304fe7a05.tar.bz2 |
formatting and comments
Diffstat (limited to 'lib/SparkPost/Resource.php')
-rw-r--r-- | lib/SparkPost/Resource.php | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/lib/SparkPost/Resource.php b/lib/SparkPost/Resource.php index bc6f78d..7fab937 100644 --- a/lib/SparkPost/Resource.php +++ b/lib/SparkPost/Resource.php @@ -5,17 +5,17 @@ namespace SparkPost; class Resource { /** - * SparkPost object used to make requests + * SparkPost object used to make requests. */ protected $sparkpost; /** - * The api endpoint that gets prepended to all requests send through this resource + * The api endpoint that gets prepended to all requests send through this resource. */ protected $endpoint; /** - * Sets up the Resource + * Sets up the Resource. * * @param SparKPost $sparkpost - the sparkpost instance that this resource is attached to * @param string $endpoint - the endpoint that this resource wraps @@ -27,7 +27,7 @@ class Resource } /** - * Sends get request to API at the set endpoint + * Sends get request to API at the set endpoint. * * @see SparkPost->request() */ @@ -37,7 +37,7 @@ class Resource } /** - * Sends put request to API at the set endpoint + * Sends put request to API at the set endpoint. * * @see SparkPost->request() */ @@ -47,7 +47,7 @@ class Resource } /** - * Sends post request to API at the set endpoint + * Sends post request to API at the set endpoint. * * @see SparkPost->request() */ @@ -57,7 +57,7 @@ class Resource } /** - * Sends delete request to API at the set endpoint + * Sends delete request to API at the set endpoint. * * @see SparkPost->request() */ @@ -67,7 +67,7 @@ class Resource } /** - * Sends requests to SparkPost object to the resource endpoint + * Sends requests to SparkPost object to the resource endpoint. * * @see SparkPost->request() * @@ -75,7 +75,6 @@ class Resource */ public function request($method = 'GET', $uri = '', $payload = [], $headers = []) { - if (is_array($uri)) { $headers = $payload; $payload = $uri; @@ -83,7 +82,7 @@ class Resource } $uri = $this->endpoint.'/'.$uri; - + return $this->sparkpost->request($method, $uri, $payload, $headers); } -}
\ No newline at end of file +} |