30 lines
816 B
PHP
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();
|
|
}
|
|
} |