*/ class Lists extends CodeDefinition { /** * Constructor */ public function __construct() { $this->parseContent = true; $this->useOption = false; $this->setTagName('list'); $this->nestLimit = -1; } /** * Compiles the list bbcode to HTML. * * @param ElementNode $el The JBBCode element node. * * @return string The compiled HTML list. */ public function asHtml(ElementNode $el) { $bodyHtml = ''; foreach ($el->getChildren() as $child) { $bodyHtml .= $child->getAsHTML(); } $listPieces = explode('[*]', $bodyHtml); unset($listPieces[0]); $listPieces = array_map(function ($li) { return "
  • {$li}
  • "; }, $listPieces); $list = implode('', $listPieces); return ""; } }