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/Paper/HtmlToPos.php
2019-03-01 07:58:22 +01:00

30 lines
816 B
PHP

<?php
namespace App\Paper;
use App\Decorators\HideLinesDecorator;
use App\Decorators\NewLineDecorator;
use App\Decorators\RandomElementsDecorator;
use App\Decorators\RandomNumberDecorator;
use App\Decorators\Text;
use App\Decorators\TextBreakDecorator;
use App\Decorators\TraficarDecorator;
use App\Decorators\VocabularyWordDecorator;
class HtmlToPos
{
public function convert($html = '')
{
$text = new Text($html);
$text = new NewLineDecorator($text);
$text = new HideLinesDecorator($text);
$text = new RandomElementsDecorator($text);
$text = new RandomNumberDecorator($text);
$text = new VocabularyWordDecorator($text);
$text = new TraficarDecorator($text);
$text = new TextBreakDecorator($text);
return $text->getText();
}
}