| 1 | <?php |
||
| 10 | final class Process implements JsonSerializable |
||
| 11 | { |
||
| 12 | /** |
||
| 13 | * @var int |
||
| 14 | */ |
||
| 15 | private $processId; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var int|null |
||
| 19 | */ |
||
| 20 | private $parentProcessId; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var string|null |
||
| 24 | */ |
||
| 25 | private $title; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var string[] |
||
| 29 | */ |
||
| 30 | private $argumentList = []; |
||
| 31 | |||
| 32 | 32 | public function __construct(int $processId) |
|
| 36 | |||
| 37 | 1 | public function withParentProcessId(int $id): self |
|
| 44 | |||
| 45 | 1 | public function titled(string $title): self |
|
| 52 | |||
| 53 | 1 | public function withArguments(string ...$argument): self |
|
| 60 | |||
| 61 | /** |
||
| 62 | * @return mixed[] |
||
| 63 | */ |
||
| 64 | 26 | public function jsonSerialize(): array |
|
| 73 | } |
||
| 74 |