class Tag implements ConfigProvider

Traits

Provides magic get, set, isset and unset implementations

Properties

AttributeCollection $attributes

This tag's attributes

AttributePreprocessorCollection $attributePreprocessors

This tag's attribute parsers

TagFilterChain $filterChain

This tag's filter chain

int $nestingLimit

Maximum nesting level for this tag

Ruleset $rules

Rules associated with this tag

int $tagLimit

Maximum number of this tag per message

string|Template write-only $template

Template associated with this tag

Methods

mixed
__get(string $propName)

Magic getter

void
__set(string $propName, mixed $propValue)

Magic setter

bool
__isset(string $propName)

Test whether a property is set

void
__unset(string $propName)

Unset a property, if the class supports it

__construct(array|null $options = null)

Constructor

array|Dictionary|null
asConfig()

Return an array-based representation of this object to be used for parsing

getTemplate()

Return this tag's template

bool
issetTemplate()

Test whether this tag has a template

void
setAttributePreprocessors(array|AttributePreprocessorCollection $attributePreprocessors)

Set this tag's attribute preprocessors

void
setNestingLimit(int $limit)

Set this tag's nestingLimit

void
setRules(array|Ruleset $rules)

Set this tag's rules

void
setTagLimit(int $limit)

Set this tag's tagLimit

void
setTemplate(string|Template $template)

Set the template associated with this tag

void
unsetTemplate()

Unset this tag's template

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

Parameters

string $propName

Return Value

mixed

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.

Parameters

string $propName
mixed $propValue

Return Value

void

in Configurable at line 147
bool __isset(string $propName)

Test whether a property is set

Parameters

string $propName

Return Value

bool

in Configurable at line 164
void __unset(string $propName)

Unset a property, if the class supports it

Parameters

string $propName

Return Value

void

at line 74
__construct(array|null $options = null)

Constructor

Parameters

array|null $options

This tag's options

at line 108
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

Return Value

array|Dictionary|null

at line 145
Template getTemplate()

Return this tag's template

Return Value

Template

at line 155
bool issetTemplate()

Test whether this tag has a template

Return Value

bool

at line 166
void setAttributePreprocessors(array|AttributePreprocessorCollection $attributePreprocessors)

Set this tag's attribute preprocessors

Parameters

array|AttributePreprocessorCollection $attributePreprocessors

2D array of [attrName=>[regexp]], or an instance of AttributePreprocessorCollection

Return Value

void

at line 178
void setNestingLimit(int $limit)

Set this tag's nestingLimit

Parameters

int $limit

Return Value

void

at line 196
void setRules(array|Ruleset $rules)

Set this tag's rules

Parameters

array|Ruleset $rules

2D array of rule definitions, or instance of Ruleset

Return Value

void

at line 208
void setTagLimit(int $limit)

Set this tag's tagLimit

Parameters

int $limit

Return Value

void

at line 226
void setTemplate(string|Template $template)

Set the template associated with this tag

Parameters

string|Template $template

Return Value

void

at line 241
void unsetTemplate()

Unset this tag's template

Return Value

void