A fork of potaka/bbcode to handle future maintenance
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
588B

  1. <?php
  2. namespace Knockout\BbCode\Tag;
  3. use Knockout\BbCode\Tokenizer\Tag as TokenTag;
  4. /**
  5. * Description of TextTag
  6. *
  7. * @author po_taka <angel.koilov@gmail.com>
  8. */
  9. class TextTag implements TagInterface
  10. {
  11. public function format(TokenTag $tokenTag) : string
  12. {
  13. $formattedString = "{$tokenTag->getText()}";
  14. return $formattedString;
  15. }
  16. public function getName(): string
  17. {
  18. return '';
  19. }
  20. public function getOriginalText(TokenTag $tokenTag): string
  21. {
  22. // there is nothing special
  23. return $this->format($tokenTag);
  24. }
  25. }