Skip to content

Commit e96c155

Browse files
authored
Removed deprecated code from #348 (#351)
1 parent f09b49c commit e96c155

File tree

5 files changed

+24
-76
lines changed

5 files changed

+24
-76
lines changed

src/Stream/ResultStream.php

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,32 @@
44

55
namespace AsyncAws\Core\Stream;
66

7-
use AsyncAws\Core\StreamableBodyInterface;
8-
97
/**
108
* Stream for a Result.
119
*/
12-
interface ResultStream extends StreamableBodyInterface
10+
interface ResultStream
1311
{
12+
/**
13+
* Download the response in chunks.
14+
*
15+
* $fileHandler = fopen('/output.pdf', 'w');
16+
* foreach ($result->getBody()->getChunks() as $chunk) {
17+
* fwrite($fileHandler, $chunk);
18+
* }
19+
*
20+
* @return iterable<string>
21+
*/
22+
public function getChunks(): iterable;
23+
24+
/**
25+
* Download content into a temporary resource and return a string.
26+
*/
27+
public function getContentAsString(): string;
28+
29+
/**
30+
* Download content into a resource and then return that resource.
31+
*
32+
* @return resource
33+
*/
34+
public function getContentAsResource();
1435
}

src/Stream/Stream.php

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/StreamableBody.php

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/StreamableBodyInterface.php

Lines changed: 0 additions & 35 deletions
This file was deleted.

src/Test/SimpleStreamableBody.php

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)