RulesGenerator
class RulesGenerator implements ArrayAccess, Iterator
Traits
Allows an object to act as a proxy for a NormalizedCollection stored in $this->collection
Properties
protected RulesGeneratorList | $collection |
Methods
Forward all unknown method calls to $this->collection
No description
No description
implementation to allow assignment with a null offset to append to the
No description
No description
No description
No description
No description
No description
No description
a value to this list
No description
Test whether a given value is present in this collection
Delete a value from this list and remove gaps in keys
Test whether an item of given key exists
Return a value from this collection
Find the index of a given value
Ensure that the key is a valid offset
Normalize the value to an object
is called with a key that already exists
Set and overwrite a value in this collection
Constructor
Generate and return rules based on a set of TemplateInspector
Generate a set of rules to be applied at the root of a document
Generate a set of rules for a single TemplateInspector instance
Append a value to this list
Empty this collection
Insert a value at an arbitrary 0-based position
Prepend a value to this list
Remove all items matching given value
Details
in
CollectionProxy at line 36
mixed
__call(string $methodName, array $args)
Forward all unknown method calls to $this->collection
at line 48
bool
offsetExists(string|int $offset)
No description
at line 48
mixed
offsetGet(string|int $offset)
No description
at line 48
void
offsetSet(mixed $offset, mixed $value) Custom offsetSet()
implementation to allow assignment with a null offset to append to the
at line 48
void
offsetUnset(string|int $offset)
No description
at line 48
int
count()
No description
at line 48
mixed
current()
No description
at line 48
int|string
key()
No description
at line 48
mixed
next()
No description
at line 48
void
rewind()
No description
at line 48
bool
valid()
No description
at line 48
mixed
add(mixed $value, null $void) Add (append)
a value to this list
at line 48
array
asConfig()
No description
at line 48
bool
contains(mixed $value)
Test whether a given value is present in this collection
at line 48
void
delete(string $key)
Delete a value from this list and remove gaps in keys
at line 48
bool
exists(string $key)
Test whether an item of given key exists
at line 48
mixed
get(string $key)
Return a value from this collection
at line 48
mixed
indexOf(mixed $value)
Find the index of a given value
at line 48
int
normalizeKey(mixed $key)
Ensure that the key is a valid offset
at line 48
TargetedRulesGenerator
normalizeValue(TargetedRulesGenerator $generator)
Normalize the value to an object
at line 48
string
onDuplicate(string|null $action) Query and set the action to take when add()
is called with a key that already exists
at line 48
mixed
set(string $key, mixed $value)
Set and overwrite a value in this collection
at line 62
__construct()
Constructor
Will load the default rule generators
at line 84
array
getRules(TagCollection $tags)
Generate rules for given tag collection
at line 100
protected array
generateTagRules(array $tagInspectors)
Generate and return rules based on a set of TemplateInspector
at line 117
protected array
generateRootRules(array $tagInspectors)
Generate a set of rules to be applied at the root of a document
at line 146
protected array
generateRuleset(TemplateInspector $srcInspector, array $trgInspectors)
Generate a set of rules for a single TemplateInspector instance
at line 181
protected array
getTagInspectors(TagCollection $tags)
Inspect given list of tags
at line 48
mixed
append(mixed $value)
Append a value to this list
at line 48
void
clear()
Empty this collection
at line 48
mixed
insert(int $offset, mixed $value)
Insert a value at an arbitrary 0-based position
at line 48
mixed
prepend(mixed $value)
Prepend a value to this list
at line 48
int
remove(mixed $value)
Remove all items matching given value