public function getHtml(string $text) : string
    {
        $textAsHtml = htmlspecialchars($text, ENT_QUOTES);
        $textWithNewLines = nl2br($textAsHtml);

        $tokenized = $this->tokenizer->tokenize($textWithNewLines);
        $html = $this->bbCode->format($tokenized);

        return $html;
    }
public function getHtml(string $text) : string
    {
        $textAsHtml = htmlspecialchars($text, ENT_QUOTES);
        $textWithNewLines = nl2br($textAsHtml);

        $tokenized = $this->tokenizer->tokenize($textWithNewLines);
        $html = $this->bbCode->format($tokenized);

        return $html;
    }
public function getHtml ( string $ text ) : string { $ textAsHtml = htmlspecialchars ( $ text , ENT_QUOTES ) ; $ textWithNewLines = nl2br ( $ textAsHtml ) ; $ tokenized = $ this -> tokenizer -> tokenize ( $ textWithNewLines ) ; $ html = $ this -> bbCode -> format ( $ tokenized ) ; return $ html ; }
Transform string to html escaped string with applied bb-code.

@param string $text
@return string
Transform string to html escaped string with applied bb - code .