Skip to content

Commit

Permalink
Merge pull request #5 from miniplay/fix-namespace
Browse files Browse the repository at this point in the history
Composer namespace + Readme
  • Loading branch information
pfefferle committed Nov 4, 2015
2 parents 28a8c26 + 7bd5f07 commit a5b623f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Update your `composer` require block:

# Usage
```php
use pubsubhubbub\subscriber\Subscriber;
use \Pubsubhubbub\Subscriber\Subscriber;

$hub_url = "http://pubsubhubbub.appspot.com";
$callback_url = "put your own endpoint here";
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@
"php": "~5.4 || ~7.0"
},
"autoload": {
"psr-4": { "pubsubhubbub\\subscriber\\": "src/" }
"psr-4": { "Pubsubhubbub\\Subscriber\\": "src/" }
}
}
4 changes: 3 additions & 1 deletion example.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@

include("./src/Subscriber.php");

use \Pubsubhubbub\Subscriber\Subscriber;

$hub_url = "http://pubsubhubbub.appspot.com";
$callback_url = "put your own endpoint here";

$feed = "http://feeds.feedburner.com/onlineaspect";

// create a new subscriber
$s = new Pubsubhubbub\Subscriber\Subscriber($hub_url, $callback_url);
$s = new Subscriber($hub_url, $callback_url);

// subscribe to a feed
$s->subscribe($feed);
Expand Down

0 comments on commit a5b623f

Please sign in to comment.