| 1 | <?php |
||
| 15 | class TextContentParser |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @var AbstractFileContent |
||
| 19 | */ |
||
| 20 | private $content; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @param AbstractFileContent $content |
||
| 24 | */ |
||
| 25 | 1 | public function __construct(AbstractFileContent $content) |
|
| 26 | { |
||
| 27 | 1 | $this->content = $content; |
|
| 28 | 1 | } |
|
| 29 | |||
| 30 | /** |
||
| 31 | * @return TextContent |
||
| 32 | */ |
||
| 33 | 1 | public function parse() |
|
| 34 | { |
||
| 35 | 1 | return new TextContent($this->content->getValue(), $this->convertContentToLines()); |
|
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @return array |
||
| 40 | */ |
||
| 41 | protected function convertContentToLines() |
||
| 50 | } |
||
| 51 |