Skip to content

Commit adeab79

Browse files
committed
Merge pull request KnpLabs#98 from fh/namespace-fix
Added missing \ prefix for the github classes to deal with namespaces
2 parents fc5aef1 + 2f44ea6 commit adeab79

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.markdown

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ Now we can use autoloader from Composer by:
5252
// This file is generated by Composer
5353
require_once 'vendor/autoload.php';
5454

55-
$client = new Github\Client();
55+
$client = new \Github\Client();
5656
$repositories = $client->api('user')->repositories('ornicar');
5757
```
5858

@@ -66,19 +66,19 @@ From `$client` object, you can access to all GitHub.
6666
// This file is generated by Composer
6767
require_once 'vendor/autoload.php';
6868

69-
$client = new Github\Client(
70-
new Github\HttpClient\CachedHttpClient(array('cache_dir' => '/tmp/github-api-cache'))
69+
$client = new \Github\Client(
70+
new \Github\HttpClient\CachedHttpClient(array('cache_dir' => '/tmp/github-api-cache'))
7171
);
7272

7373
// Or select directly which cache you want to use
74-
$client = new Github\HttpClient\CachedHttpClient();
74+
$client = new \Github\HttpClient\CachedHttpClient();
7575
$client->setCache(
7676
// Built in one, or any cache implementing this interface:
7777
// Github\HttpClient\Cache\CacheInterface
78-
new Github\HttpClient\Cache\FilesystemCache('/tmp/github-api-cache')
78+
new \Github\HttpClient\Cache\FilesystemCache('/tmp/github-api-cache')
7979
);
8080

81-
$client = new Github\Client($client);
81+
$client = new \Github\Client($client);
8282
```
8383

8484
Using cache, the client will get cached responses if resources haven't changed since last time,

0 commit comments

Comments
 (0)