1 | <?php |
||
17 | abstract class AbstractSendableWriter extends AbstractWriter implements HttpSendableInterface |
||
18 | { |
||
19 | /** |
||
20 | * Return (default) headers for sending store data via http. |
||
21 | * |
||
22 | * @return \Soluble\FlexStore\Writer\Http\SimpleHeaders |
||
23 | */ |
||
24 | abstract public function getHttpHeaders(); |
||
25 | |||
26 | /** |
||
27 | * Send the store data via http. |
||
28 | * |
||
29 | * @throws \Exception if error occurs in getData |
||
30 | * |
||
31 | * @param SimpleHeaders $headers |
||
32 | * @param bool $die_after |
||
33 | */ |
||
34 | public function send(SimpleHeaders $headers = null, $die_after = true) |
||
53 | } |
||
54 |
An exit expression should only be used in rare cases. For example, if you write a short command line script.
In most cases however, using an
exit
expression makes the code untestable and often causes incompatibilities with other libraries. Thus, unless you are absolutely sure it is required here, we recommend to refactor your code to avoid its usage.