Skip to content

Commit

Permalink
- use psr-1
Browse files Browse the repository at this point in the history
  • Loading branch information
ARACOOOL committed Mar 31, 2015
1 parent 82a0f9c commit 93f39f2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions dHttp/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public function put($fields = array(), array $options = array())
public function get(array $options = array())
{
$this->addOptions($options);
return $this->_exec();
return $this->exec();
}

/**
Expand Down Expand Up @@ -171,7 +171,7 @@ public function multi(array $handlers)
if (!$item instanceof Client) {
throw new \Exception('Handler should be object instance of dHttp\Client');
}
$res = $item->_init();
$res = $item->init();

curl_multi_add_handle($mc, $res);
$resources[] = $res;
Expand Down Expand Up @@ -209,9 +209,9 @@ public function multi(array $handlers)
*
* @return Response
*/
private function _exec()
private function exec()
{
$ch = $this->_init();
$ch = $this->init();
// Collect response data
$response = new Response(array(
'response' => curl_exec($ch),
Expand All @@ -233,11 +233,11 @@ private function _exec()
*
* @return resource
*/
public function _init()
public function init()
{
$ch = curl_init();
// The initial parameters
$this->_setCurlOptions($ch, $this->_options);
$this->setCurlOptions($ch, $this->_options);
return $ch;
}

Expand All @@ -248,7 +248,7 @@ public function _init()
* @param array $options
* @return void
*/
private function _setCurlOptions(&$ch, array $options)
private function setCurlOptions(&$ch, array $options)
{
curl_setopt_array($ch, $options);
}
Expand Down

0 comments on commit 93f39f2

Please sign in to comment.