1: <?php declare(strict_types=1);
2:
3: namespace Salient\Console\Support;
4:
5: use Psr\Log\LoggerInterface;
6: use Salient\Contract\Console\ConsoleTargetInterface as Target;
7: use Salient\Contract\Console\ConsoleTargetStreamInterface as TargetStream;
8: use Salient\Contract\Console\ConsoleTargetTypeFlag as TargetTypeFlag;
9: use Salient\Contract\Core\MessageLevel as Level;
10:
11: /**
12: * ConsoleWriter state information
13: */
14: final class ConsoleWriterState
15: {
16: /** @var array<Level::*,TargetStream[]> */
17: public array $StdioTargetsByLevel = [];
18: /** @var array<Level::*,TargetStream[]> */
19: public array $TtyTargetsByLevel = [];
20: /** @var array<Level::*,Target[]> */
21: public array $TargetsByLevel = [];
22: /** @var array<int,Target> */
23: public array $Targets = [];
24: /** @var array<int,Target> */
25: public array $DeregisteredTargets = [];
26: /** @var array<int,int-mask-of<TargetTypeFlag::*>> */
27: public array $TargetTypeFlags = [];
28: public ?TargetStream $StdoutTarget = null;
29: public ?TargetStream $StderrTarget = null;
30: public int $GroupLevel = -1;
31: /** @var array<array{string|null,string|null}> */
32: public array $GroupMessageStack = [];
33: public int $ErrorCount = 0;
34: public int $WarningCount = 0;
35: /** @var array<string,true> */
36: public array $Written = [];
37: /** @var string[] */
38: public array $LastWritten = [];
39: /** @var array{int<0,max>,float}|null */
40: public ?array $SpinnerState;
41: public LoggerInterface $Logger;
42: }
43: