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.
|
- <?php
-
- namespace Knockout\BbCode\Tag;
-
- use Knockout\BbCode\Tokenizer\Tag as TokenTag;
-
- /**
- * Description of UnknownSimpleType
- *
- * @author po_taka <angel.koilov@gmail.com>
- */
- class UnknownSimpleType implements TagInterface
- {
- public function format(TokenTag $tokenTag) : string
- {
- $formattedString = "[{$tokenTag->getType()}";
-
- if ($tokenTag->getArgument()) {
- $formattedString .= "={$tokenTag->getArgument()}";
- }
-
- $formattedString .= "]{$tokenTag->getText()}[/{$tokenTag->getType()}]";
- return $formattedString;
- }
-
- public function getName(): string
- {
- return '';
- }
-
- public function getOriginalText(TokenTag $tokenTag): string
- {
- return "[{$tokenTag->getType()}]{$tokenTag->getText()}[/{$tokenTag->getType()}]";
- }
- }
|