Skip to content

Commit

Permalink
made curl calls private
Browse files Browse the repository at this point in the history
  • Loading branch information
pincombe committed Jan 17, 2013
1 parent cfd2de9 commit 2aed38c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/Transmit/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,27 @@ public function __construct($hostname, $key)
$this->key = $key;
}

public function get($uri)
protected function _get($uri)
{
return $this->request($uri);
return $this->_request($uri);
}

public function post($uri, $post_data)
protected function _post($uri, $post_data)
{
return $this->request($uri, 'POST', $post_data);
return $this->_request($uri, 'POST', $post_data);
}

public function put($uri, $post_data)
protected function _put($uri, $post_data)
{
return $this->request($uri, 'PUT', $post_data);
return $this->_request($uri, 'PUT', $post_data);
}

public function delete($uri)
protected function _delete($uri)
{
return $this->request($uri, 'DELETE');
return $this->_request($uri, 'DELETE');
}

private function request($uri, $type = 'GET', $post_data = '')
private function _request($uri, $type = 'GET', $post_data = '')
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $this->hostname . $uri);
Expand Down

0 comments on commit 2aed38c

Please sign in to comment.