| @@ 125-136 (lines=12) @@ | ||
| 122 | /** |
|
| 123 | * {@inheritdoc} |
|
| 124 | */ |
|
| 125 | public function getPreviousCharacterContent(\SplFileObject $file) |
|
| 126 | { |
|
| 127 | $originalPosition = $file->ftell(); |
|
| 128 | ||
| 129 | $this->walker->goBeforeCharacter($file, $originalPosition - 1); |
|
| 130 | ||
| 131 | $character = $file->fgetc(); |
|
| 132 | ||
| 133 | $this->walker->goBeforeCharacter($file, $originalPosition); |
|
| 134 | ||
| 135 | return $character; |
|
| 136 | } |
|
| 137 | ||
| 138 | /** |
|
| 139 | * {@inheritdoc} |
|
| @@ 141-152 (lines=12) @@ | ||
| 138 | /** |
|
| 139 | * {@inheritdoc} |
|
| 140 | */ |
|
| 141 | public function getCharacterContent(\SplFileObject $file, $characterNumber) |
|
| 142 | { |
|
| 143 | $originalPosition = $file->ftell(); |
|
| 144 | ||
| 145 | $this->walker->goBeforeCharacter($file, $characterNumber); |
|
| 146 | ||
| 147 | $character = $this->getNextCharacterContent($file); |
|
| 148 | ||
| 149 | $this->walker->goBeforeCharacter($file, $originalPosition); |
|
| 150 | ||
| 151 | return $character; |
|
| 152 | } |
|
| 153 | ||
| 154 | /** |
|
| 155 | * {@inheritdoc} |
|