ElkArte 1.1.1 Documentation
  • Namespace
  • Class
  • Tree
  • Todo
  • Deprecated

Namespaces

  • BBC
  • ElkArte
    • Errors
    • Search
      • API
    • sources
      • modules
      • subs
        • CacheMethod
        • MentionType
        • ScheduledTask
        • SessionHandler
        • SettingsFormAdapter
  • None

Classes

  • Autolink
  • BBCParser
  • Codes
  • HtmlParser
  • ParserWrapper
  • PreparseCode
  • SmileyParser

Class ParserWrapper

Class ParserWrapper

Wrap around the BBC parsers before we implement a DIC. Deprecate in future versions in favor of a DIC

Final
Namespace: BBC
Located at sources/subs/BBC/ParserWrapper.php

Methods summary

public static BBC\ParserWrapper
# instance( )

Find and return ParserWrapper instance if it exists, or create a new instance

Find and return ParserWrapper instance if it exists, or create a new instance

Returns

BBC\ParserWrapper
private
# __construct( )

ParserWrapper constructor.

ParserWrapper constructor.

protected boolean
# checkLoad( )

Check if the server load is too high to execute BBC parsing

Check if the server load is too high to execute BBC parsing

Returns

boolean
If the parser can execute
protected boolean
# isEnabled( )

Is BBC parsing enabled

Is BBC parsing enabled

Returns

boolean
public
# enableSmileys( boolean|integer $toggle )

Enable or disable smileys

Enable or disable smileys

Parameters

$toggle

Returns


$this
protected array
# getParsersByArea( string $area )

Get parsers based on where it will be used

Get parsers based on where it will be used

Parameters

$area
Where it is being called from

Returns

array
public array
# getMessageParser( )

Return the current message parsers

Return the current message parsers

Returns

array
public array
# getSignatureParser( )

Return the current signature parsers

Return the current signature parsers

Returns

array
public array
# getNewsParser( )

Return the news parsers

Return the news parsers

Returns

array
protected string
# parse( string $area, string $message )

Parse a string based on where it's being called from

Parse a string based on where it's being called from

Parameters

$area
Where this is being called from
$message
The message to be parsed

Returns

string
The Parsed message
public string
# parseMessage( string $message, boolean|integer $smileys_enabled )

Parse the BBC and smileys in messages

Parse the BBC and smileys in messages

Parameters

$message
$smileys_enabled

Returns

string
public string
# parseSignature( string $signature, boolean $smileys_enabled )

Parse the BBC and smileys in signatures

Parse the BBC and smileys in signatures

Parameters

$signature
$smileys_enabled

Returns

string
public string
# parseNews( string $news )

Parse the BBC and smileys in news items

Parse the BBC and smileys in news items

Parameters

$news

Returns

string
public string
# parseEmail( string $email )

Parse the BBC and smileys in emails

Parse the BBC and smileys in emails

Parameters

$email

Returns

string
public string
# parseCustomFields( string $field )

Parse the BBC and smileys in custom profile fields

Parse the BBC and smileys in custom profile fields

Parameters

$field

Returns

string
public string
# parsePoll( string $poll )

Parse the BBC and smileys in poll questions/answers

Parse the BBC and smileys in poll questions/answers

Parameters

$poll

Returns

string
public string
# parseAgreement( string $agreement )

Parse the BBC and smileys in the registration agreement

Parse the BBC and smileys in the registration agreement

Parameters

$agreement

Returns

string
public string
# parsePM( string $pm )

Parse the BBC and smileys in personal messages

Parse the BBC and smileys in personal messages

Parameters

$pm

Returns

string
public string
# parseReport( string $report )

Parse the BBC and smileys in user submitted reports

Parse the BBC and smileys in user submitted reports

Parameters

$report

Returns

string
public string
# parsePackage( string $package )

Parse the BBC and smileys in package descriptions

Parse the BBC and smileys in package descriptions

Parameters

$package

Returns

string
public string
# parseVerificationControls( string $question )

Parse the BBC and smileys in user verification controls

Parse the BBC and smileys in user verification controls

Parameters

$question

Returns

string
public string
# parseNotice( string $notice )

Parse the BBC and smileys in moderator notices to users

Parse the BBC and smileys in moderator notices to users

Parameters

$notice

Returns

string
public string
# parseBoard( string $board )

Parse the BBC and smileys in board descriptions

Parse the BBC and smileys in board descriptions

Parameters

$board

Returns

string
public
# setDisabled( array $disabled )

Set the disabled tags

Set the disabled tags

Parameters

$disabled
(usually from $modSettings['disabledBBC'])

Returns


$this
public BBC\Codes
# getCodes( )

Return the bbc code definitions for the parser

Return the bbc code definitions for the parser

Returns

BBC\Codes
public BBC\BBCParser
# getBBCParser( )

Return an instance of the bbc parser

Return an instance of the bbc parser

Returns

BBC\BBCParser
public BBC\Autolink
# getAutolinkParser( )

Return an, that's right not and, just an, like a single instance of the autolink parser

Return an, that's right not and, just an, like a single instance of the autolink parser

Returns

BBC\Autolink
public BBC\SmileyParser
# getSmileyParser( )

Return an, that's right not and, just an, like a single instance of the Smiley parser

Return an, that's right not and, just an, like a single instance of the Smiley parser

Returns

BBC\SmileyParser
public BBC\HtmlParser
# getHtmlParser( )

Return an, that's right not and, just an, like a single instance of the HTML parser

Return an, that's right not and, just an, like a single instance of the HTML parser

Returns

BBC\HtmlParser

Properties summary

protected array $disabled

Disabled tags

Disabled tags

# array()
protected BBC\Codes $codes
#
protected BBC\BBCParser $bbc_parser
#
protected BBC\SmileyParser $smiley_parser
#
protected BBC\HtmlParser $html_parser
#
protected BBC\Autolink $autolink_parser
#
protected boolean $smileys_enabled

If smileys are enabled

If smileys are enabled

# true
public static BBC\ParserWrapper $instance
#
ElkArte 1.1.1 Documentation API documentation generated by ApiGen