Skip to content

Commit

Permalink
Add implementation for new interface method
Browse files Browse the repository at this point in the history
  • Loading branch information
dkreuer committed Jul 27, 2015
1 parent 6011f7f commit a06aacf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
],
"require": {
"php": ">=5.5.0",
"metasyntactical/http-transport": "^1.0",
"metasyntactical/http-transport": "^1.2",
"guzzlehttp/guzzle": "^6.0"
},
"require-dev": {
Expand Down
15 changes: 15 additions & 0 deletions src/GuzzleTransport.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace MetaSyntactical\Http\Transport\Guzzle;

use GuzzleHttp\Client;
use GuzzleHttp\Psr7;
use GuzzleHttp\Psr7\Request;
use MetaSyntactical\Http\Transport\TransportInterface;
use Psr\Http\Message\RequestInterface;
Expand Down Expand Up @@ -43,4 +44,18 @@ public function newRequest()
{
return new Request(null, "");
}

/**
* Build a query string from an array of key value pairs
*
* @param array $params Query string parameters.
* @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986
* to encode using RFC3986, or PHP_QUERY_RFC1738
* to encode using RFC1738.
* @return string
*/
public function buildQuery(array $params, $encoding = PHP_QUERY_RFC3986)
{
return Psr7\build_query($params, $encoding);
}
}

0 comments on commit a06aacf

Please sign in to comment.