Total Complexity | 4 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
18 | final class UnrelocatedProcessMemoryByteReader implements ByteReaderInterface |
||
19 | { |
||
20 | use ByteReaderDisableWriteAccessTrait; |
||
21 | |||
22 | private ByteReaderInterface $byte_reader; |
||
23 | private ProcessModuleMemoryMapInterface $module_memory_map; |
||
24 | |||
25 | /** |
||
26 | * UnrelocatedProcessMemoryByteReader constructor. |
||
27 | * @param ByteReaderInterface $byte_reader |
||
28 | * @param ProcessModuleMemoryMapInterface $module_memory_map |
||
29 | */ |
||
30 | public function __construct(ByteReaderInterface $byte_reader, ProcessModuleMemoryMapInterface $module_memory_map) |
||
31 | { |
||
32 | $this->byte_reader = $byte_reader; |
||
33 | $this->module_memory_map = $module_memory_map; |
||
34 | } |
||
35 | |||
36 | public function offsetExists($offset): bool |
||
39 | } |
||
40 | |||
41 | public function offsetGet($offset): int |
||
42 | { |
||
43 | return $this->byte_reader[$this->module_memory_map->getMemoryAddressFromOffset($offset)]; |
||
44 | } |
||
45 | |||
46 | public function createSliceAsString(int $offset, int $size): string |
||
51 | ); |
||
52 | } |
||
53 | } |
||
54 |