From 78cccf1a8fe7784b99d1ab0553255af480c10bfe Mon Sep 17 00:00:00 2001 From: Adrian Palmer Date: Thu, 28 Aug 2014 13:02:37 +1000 Subject: [PATCH] Rename CreateRequestSubscriber to RequestSubscriber --- README.md | 4 ++-- .../{CreateRequestSubscriber.php => RequestSubscriber.php} | 2 +- tests/GuzzleSignerTest.php | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) rename src/HttpSignatures/Guzzle/{CreateRequestSubscriber.php => RequestSubscriber.php} (88%) diff --git a/README.md b/README.md index 45d0878..84e165c 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ This library includes support for automatically signing Guzzle requests using an ```php use HttpSignatures\Context; -use HttpSignatures\Guzzle\CreateRequestSubscriber; +use HttpSignatures\Guzzle\RequestSubscriber; $context = new Context(array( 'keys' => array('examplekey' => 'secret-key-here'), @@ -21,7 +21,7 @@ $context = new Context(array( )); $client = new \Guzzle\Http\Client('http://example.org'); -$client->addSubscriber(new CreateRequestSubscriber($context)); +$client->addSubscriber(new RequestSubscriber($context)); // The below will now send a signed request to: http://example.org/path?query=123 $client->get('/path?query=123', array( diff --git a/src/HttpSignatures/Guzzle/CreateRequestSubscriber.php b/src/HttpSignatures/Guzzle/RequestSubscriber.php similarity index 88% rename from src/HttpSignatures/Guzzle/CreateRequestSubscriber.php rename to src/HttpSignatures/Guzzle/RequestSubscriber.php index d3f50fb..bf28ff2 100644 --- a/src/HttpSignatures/Guzzle/CreateRequestSubscriber.php +++ b/src/HttpSignatures/Guzzle/RequestSubscriber.php @@ -5,7 +5,7 @@ namespace HttpSignatures\Guzzle; use Guzzle\Common\Event; use Symfony\Component\EventDispatcher\EventSubscriberInterface; -class CreateRequestSubscriber implements EventSubscriberInterface +class RequestSubscriber implements EventSubscriberInterface { private $context; diff --git a/tests/GuzzleSignerTest.php b/tests/GuzzleSignerTest.php index 3e7e91b..6993148 100644 --- a/tests/GuzzleSignerTest.php +++ b/tests/GuzzleSignerTest.php @@ -2,7 +2,7 @@ namespace HttpSignatures\Test; -use HttpSignatures\Guzzle\CreateRequestSubscriber; +use HttpSignatures\Guzzle\RequestSubscriber; use HttpSignatures\Context; use HttpSignatures\Guzzle\Message; @@ -17,7 +17,7 @@ class GuzzleSignerTest extends \PHPUnit_Framework_TestCase )); $this->client = new \Guzzle\Http\Client(); - $this->client->addSubscriber(new CreateRequestSubscriber($this->context)); + $this->client->addSubscriber(new RequestSubscriber($this->context)); } public function testGuzzleRequestHasExpectedHeaders()