Skip to content

Added missing \ prefix for the github classes to deal with namespaces #98

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 1, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Now we can use autoloader from Composer by:
// This file is generated by Composer
require_once 'vendor/autoload.php';

$client = new Github\Client();
$client = new \Github\Client();
$repositories = $client->api('user')->repositories('ornicar');
```

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

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

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

$client = new Github\Client($client);
$client = new \Github\Client($client);
```

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