PHP Class bbcode

Mostra file Open project: phpbb/phpbb Class Usage Examples

Public Properties

Property Type Description
$bbcode_bitfield
$bbcode_cache
$bbcode_template
$bbcode_uid
$bbcodes
$template_bitfield

Public Methods

Method Description
bbcode ( $bitfield = '' ) Constructor Init bbcode cache entries if bitfield is specified
bbcode_cache_init ( ) Init bbcode cache
bbcode_list ( $type ) Second parse list bbcode
bbcode_second_pass ( &$message, $bbcode_uid = '', $bbcode_bitfield = false ) Second pass bbcodes
bbcode_second_pass_by_extension ( ) : mixed Function to perform custom bbcode second pass by extensions can be used to assign bbcode pattern replacement Example: '#\[list=([^\[]+):$uid\]#e' => "\$this->bbcode_second_pass_by_extension('\$1')"
bbcode_second_pass_code ( $type, $code ) Second parse code tag
bbcode_second_pass_quote ( $username, $quote ) Second parse quote tag
bbcode_tpl ( $tpl_name, $bbcode_id, $skip_bitfield_check = false ) Return bbcode template
bbcode_tpl_replace ( $tpl_name, $tpl ) Return bbcode template replacement

Method Details

bbcode() public method

Constructor Init bbcode cache entries if bitfield is specified
public bbcode ( $bitfield = '' )

bbcode_cache_init() public method

requires: $this->bbcode_bitfield sets: $this->bbcode_cache with bbcode templates needed for bbcode_bitfield
public bbcode_cache_init ( )

bbcode_list() public method

Second parse list bbcode
public bbcode_list ( $type )

bbcode_second_pass() public method

Second pass bbcodes
public bbcode_second_pass ( &$message, $bbcode_uid = '', $bbcode_bitfield = false )

bbcode_second_pass_by_extension() public method

Accepts variable number of parameters
public bbcode_second_pass_by_extension ( ) : mixed
return mixed Second pass result

bbcode_second_pass_code() public method

Second parse code tag
public bbcode_second_pass_code ( $type, $code )

bbcode_second_pass_quote() public method

Second parse quote tag
public bbcode_second_pass_quote ( $username, $quote )

bbcode_tpl() public method

Return bbcode template
public bbcode_tpl ( $tpl_name, $bbcode_id, $skip_bitfield_check = false )

bbcode_tpl_replace() public method

Return bbcode template replacement
public bbcode_tpl_replace ( $tpl_name, $tpl )

Property Details

$bbcode_bitfield public_oe property

public $bbcode_bitfield

$bbcode_cache public_oe property

public $bbcode_cache

$bbcode_template public_oe property

public $bbcode_template

$bbcode_uid public_oe property

public $bbcode_uid

$bbcodes public_oe property

public $bbcodes

$template_bitfield public_oe property

public $template_bitfield