BBCode
class BBCode implements ConfigProvider
Traits
Provides magic get, set, isset and unset implementations
Properties
AttributeList | $contentAttributes | List of attributes whose value is to be made the content between the BBCode's tags if it's not explicitly given |
|
string | $defaultAttribute | Name of the default attribute |
|
bool | $forceLookahead | Whether the parser should look ahead in the text for an end tag before adding a start tag |
|
string | $tagName | Name of the tag used to represent this BBCode in the intermediate representation |
Methods
No description
Return an array-based representation of this object to be used for parsing
Normalize the name of a BBCode
Set the default attribute name for this BBCode
Set the tag name that represents this BBCode in the intermediate representation
Details
in
Configurable at line 30
mixed
__get(string $propName)
Magic getter
Will return $this->foo if it exists, then $this->getFoo() or will throw an exception if neither exists
in
Configurable at line 61
void
__set(string $propName, mixed $propValue)
Magic setter
Will call $this->setFoo($propValue) if it exists, otherwise it will set $this->foo. If $this->foo is a NormalizedCollection, we do not replace it, instead we clear() it then fill it back up. It will not overwrite an object with a different incompatible object (of a different, non-extending class) and it will throw an exception if the PHP type cannot match without incurring data loss.
in
Configurable at line 147
bool
__isset(string $propName)
Test whether a property is set
in
Configurable at line 164
void
__unset(string $propName)
Unset a property, if the class supports it
at line 54
__construct(array|null $options = null)
No description
at line 69
array|Dictionary|null
asConfig()
Return an array-based representation of this object to be used for parsing
NOTE: if this method was named getConfig() it could interfere with magic getters from the Configurable trait
at line 89
static string
normalizeName(string $bbcodeName)
Normalize the name of a BBCode
Follows the same rules as tag names with one exception: "*" is kept for compatibility with other BBCode engines
at line 109
setDefaultAttribute(string $attrName)
Set the default attribute name for this BBCode
at line 119
setTagName(string $tagName)
Set the tag name that represents this BBCode in the intermediate representation