TemplateChecker
class TemplateChecker implements ArrayAccess, Iterator
Traits
Allows an object to act as a proxy for a NormalizedCollection stored in $this->collection
Properties
protected TemplateCheckList | $collection | ||
protected bool | $disabled |
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 instance of TemplateCheck
is called with a key that already exists
Set and overwrite a value in this collection
Constructor
Check a given template for disallowed content
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 49
bool
offsetExists(string|int $offset)
No description
at line 49
mixed
offsetGet(string|int $offset)
No description
at line 49
void
offsetSet(mixed $offset, mixed $value) Custom offsetSet()
implementation to allow assignment with a null offset to append to the
at line 49
void
offsetUnset(string|int $offset)
No description
at line 49
int
count()
No description
at line 49
mixed
current()
No description
at line 49
int|string
key()
No description
at line 49
mixed
next()
No description
at line 49
void
rewind()
No description
at line 49
bool
valid()
No description
at line 49
mixed
add(mixed $value, null $void) Add (append)
a value to this list
at line 49
array
asConfig()
No description
at line 49
bool
contains(mixed $value)
Test whether a given value is present in this collection
at line 49
void
delete(string $key)
Delete a value from this list and remove gaps in keys
at line 49
bool
exists(string $key)
Test whether an item of given key exists
at line 49
mixed
get(string $key)
Return a value from this collection
at line 49
mixed
indexOf(mixed $value)
Find the index of a given value
at line 49
int
normalizeKey(mixed $key)
Ensure that the key is a valid offset
at line 49
TemplateCheck
normalizeValue(mixed $check)
Normalize the value to an instance of TemplateCheck
at line 49
string
onDuplicate(string|null $action) Query and set the action to take when add()
is called with a key that already exists
at line 49
mixed
set(string $key, mixed $value)
Set and overwrite a value in this collection
at line 68
__construct()
Constructor
Will load the default checks
at line 96
void
checkTag(Tag $tag)
Check a given tag's templates for disallowed content
at line 112
void
checkTemplate(string $template, Tag|null $tag = null)
Check a given template for disallowed content
at line 140
void
disable()
deprecated
deprecated 2.2.0 Use UnsafeTemplate instead
Disable all checks
at line 152
void
enable()
deprecated
deprecated 2.2.0
Enable all checks
at line 49
mixed
append(mixed $value)
Append a value to this list
at line 49
void
clear()
Empty this collection
at line 49
mixed
insert(int $offset, mixed $value)
Insert a value at an arbitrary 0-based position
at line 49
mixed
prepend(mixed $value)
Prepend a value to this list
at line 49
int
remove(mixed $value)
Remove all items matching given value