Skip to content

Commit

Permalink
Update example to new eventloop and new S3 API
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonFrings committed Aug 30, 2021
1 parent 7c7c7a4 commit f672ce9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,15 @@ Once [installed](#install), you can use the following code to read a file from
your S3 file storage:

```php
$loop = React\EventLoop\Factory::create();
$browser = new React\Http\Browser($loop);
<?php

$s3 = new Clue\React\S3\Client($browser, $key, $secret, $bucket, $region, $endpoint);
require __DIR__ . '/vendor/autoload.php';

$s3 = new Clue\React\S3\S3Client($key, $secret, $bucket, $region, $endpoint);

$s3->read('example.txt')->then(function (string $contents) {
echo $contents;
});

$loop->run();
```

## Install
Expand Down

0 comments on commit f672ce9

Please sign in to comment.