Helper to allow deferred rendering of BB codes in text.

This is useful when putting BB code into a template. The text does not need to explicitly be rendered in the View.

When this object is coerced to a string, the text will be rendered.

package XenForo_BbCode

 Methods

Constructor.

__construct(string | array $text, \XenForo_BbCode_Parser $parser, array $extraStates) 

Parameters

$text

stringarray

May be already parsed array

$extraStates

array

Renders the text.

__toString() : string

Returns

string

 Properties

 

Extra states for the formatter.

$_extraStates : array

 

$_parser

$_parser : \XenForo_BbCode_Parser

 

Text to render.

$_text : string | array

May be already parsed array.