| 1 | <?php |
||
| 7 | class Header |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * @var string |
||
| 11 | */ |
||
| 12 | private $command; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * @var int |
||
| 16 | */ |
||
| 17 | private $length; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var BufferInterface |
||
| 21 | */ |
||
| 22 | private $checksum; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Header constructor. |
||
| 26 | * @param string $command |
||
| 27 | * @param int $length |
||
| 28 | * @param BufferInterface $checksum |
||
| 29 | */ |
||
| 30 | 96 | public function __construct($command, $length, BufferInterface $checksum) |
|
| 40 | |||
| 41 | /** |
||
| 42 | * @return string |
||
| 43 | */ |
||
| 44 | 96 | public function getCommand() |
|
| 48 | |||
| 49 | /** |
||
| 50 | * @return BufferInterface |
||
| 51 | */ |
||
| 52 | 96 | public function getChecksum() |
|
| 56 | |||
| 57 | /** |
||
| 58 | * @return int |
||
| 59 | */ |
||
| 60 | 96 | public function getLength() |
|
| 64 | } |
||
| 65 |