Skip to content

Commit

Permalink
Merge pull request #24 from CircleOfNice/unlink-link
Browse files Browse the repository at this point in the history
Opened API for deprecated HTTP method calls
  • Loading branch information
donjuandem committed Jul 22, 2015
2 parents f945674 + fa3cf1c commit a236363
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
5 changes: 4 additions & 1 deletion Resources/config/services.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
parameters:
ci.restclient.class: Ci\RestClientBundle\Services\RestClient

services:
ci.restclient:
class: Ci\RestClientBundle\Services\RestClient
class: %ci.restclient.class%
arguments: [ @ci.curl ]
ci.curl:
class: Ci\RestClientBundle\Services\Curl
Expand Down
3 changes: 2 additions & 1 deletion Services/RestClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@
* @copyright 2015 TeeAge-Beatz UG
*/
class RestClient implements RestInterface {

/**
* This variable stores the curl instance created through curl initiation
*
* @var Curl
*/
private $curl;
protected $curl;

/**
* Constructor
Expand Down
2 changes: 1 addition & 1 deletion Traits/Assertions.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ private function assertString($value) {
private function assertHttpMethod($method) {
if (!$this->assertString($method)) return false;
$validHttpMethods = array(
'GET', 'POST', 'PUT', 'DELETE', 'HEAD', 'OPTIONS', 'TRACE', 'CONNECT', 'PATCH'
'GET', 'POST', 'PUT', 'DELETE', 'HEAD', 'OPTIONS', 'TRACE', 'CONNECT', 'PATCH', 'LINK', 'UNLINK'
);
if (!in_array($method, $validHttpMethods)) return false;
return true;
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"target-dir" : "Ci/RestClientBundle",
"extra" : {
"branch-alias" : {
"dev-master" : "0.2-dev"
"dev-master" : "0.3-dev"
}
}
}

0 comments on commit a236363

Please sign in to comment.