1: <?php declare(strict_types=1);
2:
3: namespace Salient\Contract\Console\Target;
4:
5: /**
6: * @api
7: */
8: interface StreamTargetInterface extends TargetInterface
9: {
10: /**
11: * Check if the target writes to STDOUT
12: */
13: public function isStdout(): bool;
14:
15: /**
16: * Check if the target writes to STDERR
17: */
18: public function isStderr(): bool;
19:
20: /**
21: * Check if the target writes to a TTY
22: */
23: public function isTty(): bool;
24:
25: /**
26: * Get the URI or filename of the target's underlying stream, or null if its
27: * location is unknown
28: */
29: public function getUri(): ?string;
30:
31: /**
32: * Close and reopen the target's underlying stream if possible
33: */
34: public function reopen(): void;
35: }
36: