Skip to content

Commit

Permalink
Merge pull request KnpLabs#124 from cordoval/addSubscriber
Browse files Browse the repository at this point in the history
added addSubscriber method because guzzle plugins are subscribers
  • Loading branch information
cursedcoder committed Mar 19, 2014
2 parents 4b680e8 + 1bb5ba7 commit d328b43
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/Github/HttpClient/HttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
use Github\Exception\RuntimeException;
use Github\HttpClient\Listener\AuthListener;
use Github\HttpClient\Listener\ErrorListener;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;

/**
* Performs requests on GitHub API. API documentation should be self-explanatory.
Expand Down Expand Up @@ -82,6 +83,11 @@ public function addListener($eventName, $listener)
$this->client->getEventDispatcher()->addListener($eventName, $listener);
}

public function addSubscriber(EventSubscriberInterface $subscriber)
{
$this->client->addSubscriber($subscriber);
}

/**
* {@inheritDoc}
*/
Expand Down

0 comments on commit d328b43

Please sign in to comment.