This repository has been archived on 2019-03-01. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
paper-pi/app/Decorators/NewLineDecorator.php
2019-03-01 07:58:22 +01:00

20 lines
363 B
PHP

<?php
/**
* Created by PhpStorm.
* User: k
* Date: 28.02.2019
* Time: 20:23
*/
namespace App\Decorators;
class NewLineDecorator extends TextConverterDecorator
{
private $replaceElements = ['<br>', '<br />', '<br/>'];
public function getText(): string
{
return str_replace($this->replaceElements, "\n", $this->text->getText());
}
}