The BB Code Parser

BitOwl Application Suit provides a limited BB code parser. To use simply pass in the BB code encoded string to str parseBBCode(str $string, callback $attachment_callback=false). The following codes are supported.

Attachment Callback

For each call to parseBBCode an attachment callback can be provided. This is the name of the function in which to call to parse the attachment BB code. The function must have the following prototype: str function functionName($number, $innerValue). $number is the value passed in as the argument to the BB code. $innerValue is the text between the starting and closing tags.