1 | <?php |
||
17 | trait ByteOrderAwareTrait |
||
18 | { |
||
19 | /** |
||
20 | * @var int |
||
21 | */ |
||
22 | protected $byteOrder; |
||
23 | |||
24 | /** |
||
25 | * @var int |
||
26 | */ |
||
27 | protected static $machineByteOrder; |
||
28 | |||
29 | /** |
||
30 | * Get byte order |
||
31 | * |
||
32 | * @return int |
||
33 | */ |
||
34 | public function getByteOrder() |
||
42 | |||
43 | /** |
||
44 | * Set byteOrder |
||
45 | * |
||
46 | * @param int $byteOrder |
||
47 | * |
||
48 | * @throws Exception\InvalidArgumentException An exception will be thrown for invalid byte order arguments |
||
49 | * |
||
50 | * @return $this |
||
51 | */ |
||
52 | public function setByteOrder($byteOrder) |
||
61 | |||
62 | /** |
||
63 | * Get machine byte order |
||
64 | * |
||
65 | * @return int |
||
66 | */ |
||
67 | public function getMachineByteOrder() |
||
80 | } |
||
81 |