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

Commit

Permalink
[GData] Rename parameter from url to uri
Browse files Browse the repository at this point in the history
  • Loading branch information
Maks3w committed May 15, 2012
1 parent e38c565 commit 0a4821d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions library/Zend/GData/App.php
Expand Up @@ -566,7 +566,7 @@ public function prepareRequest($method,
*
* @param string $method The HTTP method for the request - 'GET', 'POST',
* 'PUT', 'DELETE'
* @param string $url The URL to which this request is being performed
* @param string $uri The URL to which this request is being performed
* @param array $headers An associative array of HTTP headers
* for this request
* @param string $body The body of the HTTP request
Expand All @@ -576,7 +576,7 @@ public function prepareRequest($method,
* s results in one
* @return \Zend\Http\Response The response object
*/
public function performHttpRequest($method, $url, $headers = null,
public function performHttpRequest($method, $uri, $headers = null,
$body = null, $contentType = null, $remainingRedirects = null)
{
if ($remainingRedirects === null) {
Expand All @@ -602,7 +602,7 @@ public function performHttpRequest($method, $url, $headers = null,
'You must specify the data to post as either a ' .
'string or a child of Zend\GData\App\Entry');
}
if ($url === null) {
if ($uri === null) {
throw new App\InvalidArgumentException(
'You must specify an URI to which to post.');
}
Expand All @@ -628,8 +628,8 @@ public function performHttpRequest($method, $url, $headers = null,

// Set the params for the new request to be performed
$this->_httpClient->setHeaders($headers);
$uriObj = Uri\UriFactory::factory($url);
preg_match("/^(.*?)(\?.*)?$/", $url, $matches);
$uriObj = Uri\UriFactory::factory($uri);
preg_match("/^(.*?)(\?.*)?$/", $uri, $matches);
$this->_httpClient->setUri($matches[1]);
$queryArray = $uriObj->getQueryAsArray();
foreach ($queryArray as $name => $value) {
Expand Down

0 comments on commit 0a4821d

Please sign in to comment.