Skip to content

Commit a5b623f

Browse files
committed
Merge pull request #5 from miniplay/fix-namespace
Composer namespace + Readme
2 parents 28a8c26 + 7bd5f07 commit a5b623f

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Update your `composer` require block:
1010

1111
# Usage
1212
```php
13-
use pubsubhubbub\subscriber\Subscriber;
13+
use \Pubsubhubbub\Subscriber\Subscriber;
1414

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

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@
1515
"php": "~5.4 || ~7.0"
1616
},
1717
"autoload": {
18-
"psr-4": { "pubsubhubbub\\subscriber\\": "src/" }
18+
"psr-4": { "Pubsubhubbub\\Subscriber\\": "src/" }
1919
}
2020
}

example.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,15 @@
77

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

10+
use \Pubsubhubbub\Subscriber\Subscriber;
11+
1012
$hub_url = "http://pubsubhubbub.appspot.com";
1113
$callback_url = "put your own endpoint here";
1214

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

1517
// create a new subscriber
16-
$s = new Pubsubhubbub\Subscriber\Subscriber($hub_url, $callback_url);
18+
$s = new Subscriber($hub_url, $callback_url);
1719

1820
// subscribe to a feed
1921
$s->subscribe($feed);

0 commit comments

Comments
 (0)