class Ruleset extends Collection implements ArrayAccess, ConfigProvider

Properties

protected array $items from  Collection
protected array $rules

Methods

clear()

Empty this collection

array|Dictionary|null
asConfig()

No description

int
count()

No description

mixed
current()

No description

int|string
key()

No description

mixed
next()

No description

void
rewind()

No description

bool
valid()

No description

__call(string $methodName, array $args)

Add a rule to this set

bool
offsetExists(string $k)

Test whether a rule category exists

mixed
offsetGet(string $k)

Return the content of a rule category

void
offsetSet($k, $v)

Not supported

void
offsetUnset(string $k)

Clear a subset of the rules

merge(array|Ruleset $rules, bool $overwrite = true)

Merge a set of rules into this collection

void
remove(string $type, string $tagName = null)

Remove a specific rule, or all the rules of a given type

addBooleanRule(string $ruleName, bool $bool = true)

Add a boolean rule

addTargetedRule(string $ruleName, string $tagName)

Add a targeted rule

void
allowChild(string $tagName)

No description

void
allowDescendant(string $tagName)

No description

void
autoClose(bool $bool = true)

No description

void
autoReopen(bool $bool = true)

No description

void
breakParagraph(bool $bool = true)

No description

void
closeAncestor(string $tagName)

No description

void
closeParent(string $tagName)

No description

void
createChild(string $tagName)

No description

void
createParagraphs(bool $bool = true)

No description

void
denyChild(string $tagName)

No description

void
denyDescendant(string $tagName)

No description

void
disableAutoLineBreaks(bool $bool = true)

No description

void
enableAutoLineBreaks(bool $bool = true)

No description

void
fosterParent(string $tagName)

No description

void
ignoreSurroundingWhitespace(bool $bool = true)

No description

void
ignoreTags(bool $bool = true)

No description

void
ignoreText(bool $bool = true)

No description

void
isTransparent(bool $bool = true)

No description

void
preventLineBreaks(bool $bool = true)

No description

void
requireParent(string $tagName)

No description

void
requireAncestor(string $tagName)

No description

void
suspendAutoLineBreaks(bool $bool = true)

No description

void
trimFirstLine(bool $bool = true)

No description

Details

in Collection at line 25
clear()

Empty this collection

at line 149
array|Dictionary|null asConfig()

No description

Return Value

array|Dictionary|null

in Collection at line 45
int count()

No description

Return Value

int

in Collection at line 57
mixed current()

No description

Return Value

mixed

in Collection at line 66
int|string key()

No description

Return Value

int|string

in Collection at line 75
mixed next()

No description

Return Value

mixed

in Collection at line 84
void rewind()

No description

Return Value

void

in Collection at line 92
bool valid()

No description

Return Value

bool

at line 83
Ruleset __call(string $methodName, array $args)

Add a rule to this set

Parameters

string $methodName

Rule name

array $args

Arguments used to add given rule

Return Value

Ruleset

at line 105
bool offsetExists(string $k)

Test whether a rule category exists

Parameters

string $k

Rule name, e.g. "allowChild" or "isTransparent"

Return Value

bool

at line 116
mixed offsetGet(string $k)

Return the content of a rule category

Parameters

string $k

Rule name, e.g. "allowChild" or "isTransparent"

Return Value

mixed

at line 125
void offsetSet($k, $v)

Not supported

Parameters

$k
$v

Return Value

void

at line 137
void offsetUnset(string $k)

Clear a subset of the rules

Parameters

string $k

Rule name, e.g. "allowChild" or "isTransparent"

Return Value

void

See also

clear()

at line 211
merge(array|Ruleset $rules, bool $overwrite = true)

Merge a set of rules into this collection

Parameters

array|Ruleset $rules

2D array of rule definitions, or instance of Ruleset

bool $overwrite

Whether to overwrite scalar rules (e.g. boolean rules)

at line 242
void remove(string $type, string $tagName = null)

Remove a specific rule, or all the rules of a given type

Parameters

string $type

Type of rules to clear

string $tagName

Name of the target tag, or none to remove all rules of given type

Return Value

void

at line 290
protected Ruleset addBooleanRule(string $ruleName, bool $bool = true)

Add a boolean rule

Parameters

string $ruleName

Name of the rule

bool $bool

Whether to enable or disable the rule

Return Value

Ruleset

at line 307
protected Ruleset addTargetedRule(string $ruleName, string $tagName)

Add a targeted rule

Parameters

string $ruleName

Name of the rule

string $tagName

Name of the target tag

Return Value

Ruleset

at line 45
void allowChild(string $tagName)

No description

Parameters

string $tagName

Return Value

void

at line 45
void allowDescendant(string $tagName)

No description

Parameters

string $tagName

Return Value

void

at line 45
void autoClose(bool $bool = true)

No description

Parameters

bool $bool

Return Value

void

at line 45
void autoReopen(bool $bool = true)

No description

Parameters

bool $bool

Return Value

void

at line 45
void breakParagraph(bool $bool = true)

No description

Parameters

bool $bool

Return Value

void

at line 45
void closeAncestor(string $tagName)

No description

Parameters

string $tagName

Return Value

void

at line 45
void closeParent(string $tagName)

No description

Parameters

string $tagName

Return Value

void

at line 45
void createChild(string $tagName)

No description

Parameters

string $tagName

Return Value

void

at line 45
void createParagraphs(bool $bool = true)

No description

Parameters

bool $bool

Return Value

void

at line 45
void denyChild(string $tagName)

No description

Parameters

string $tagName

Return Value

void

at line 45
void denyDescendant(string $tagName)

No description

Parameters

string $tagName

Return Value

void

at line 45
void disableAutoLineBreaks(bool $bool = true)

No description

Parameters

bool $bool

Return Value

void

at line 45
void enableAutoLineBreaks(bool $bool = true)

No description

Parameters

bool $bool

Return Value

void

at line 45
void fosterParent(string $tagName)

No description

Parameters

string $tagName

Return Value

void

at line 45
void ignoreSurroundingWhitespace(bool $bool = true)

No description

Parameters

bool $bool

Return Value

void

at line 45
void ignoreTags(bool $bool = true)

No description

Parameters

bool $bool

Return Value

void

at line 45
void ignoreText(bool $bool = true)

No description

Parameters

bool $bool

Return Value

void

at line 45
void isTransparent(bool $bool = true)

No description

Parameters

bool $bool

Return Value

void

at line 45
void preventLineBreaks(bool $bool = true)

No description

Parameters

bool $bool

Return Value

void

at line 45
void requireParent(string $tagName)

No description

Parameters

string $tagName

Return Value

void

at line 45
void requireAncestor(string $tagName)

No description

Parameters

string $tagName

Return Value

void

at line 45
void suspendAutoLineBreaks(bool $bool = true)

No description

Parameters

bool $bool

Return Value

void

at line 45
void trimFirstLine(bool $bool = true)

No description

Parameters

bool $bool

Return Value

void