Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit 6e40069

Browse files
committed
Merge branch 'hotfix/183'
Close #183
2 parents 91ed4ed + 3b13abc commit 6e40069

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

doc/book/emitting-responses.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,12 @@ response. A single implementation is currently available, `Zend\Diactoros\Respon
77
which will use the native PHP functions `header()` and `echo` in order to emit the response. If you
88
are using a non-SAPI implementation, you will need to create your own `EmitterInterface`
99
implementation.
10+
11+
For example, the `SapiEmitter` implementation of the `EmitterInterface` can be used thus:
12+
13+
```php
14+
$response = new Zend\Diactoros\Response();
15+
$response->getBody()->write("some content\n");
16+
$emitter = new Zend\Diactoros\Response\SapiEmitter();
17+
$emitter->emit($response);
18+
```

0 commit comments

Comments
 (0)