AbstractFlashRestriction
abstract class AbstractFlashRestriction extends TemplateCheck
NOTE: when this check is enabled, DisallowObjectParamsWithGeneratedName should be enabled too.
Otherwise, elements with a dynamic 'name' attribute could be used to bypass this restriction. For the same reason, DisallowCopy, DisallowDisableOutputEscaping, DisallowDynamicAttributeNames, DisallowDynamicElementNames and DisallowUnsafeCopyOf should all be enabled too
Constants
XMLNS_XSL |
XSL namespace |
Properties
string | $defaultSetting | ||
string | $maxSetting | ||
bool | $onlyIfDynamic | ||
protected string | $settingName | ||
protected array | $settings | ||
protected DOMElement | $template |
Methods
Constructor
Test whether given element has dynamic attributes that match the setting's name
Check embed elements in given template
Check object elements in given template
Test whether given node contains dynamic content (XSL elements or attribute value template)
Get all elements the restriction applies to
Details
at line 77
void
check(DOMElement $template, Tag $tag)
Test for the set Flash restriction
at line 64
__construct(string $maxSetting, bool $onlyIfDynamic = false)
Constructor
at line 90
protected void
checkAttributes(DOMElement $embed)
Test given element's attributes
at line 115
protected void
checkDynamicAttributes(DOMElement $embed)
Test whether given element has dynamic attributes that match the setting's name
at line 134
protected void
checkDynamicParams(DOMElement $object)
Test the presence of dynamic params in given object
at line 154
protected void
checkEmbeds()
Check embed elements in given template
at line 171
protected void
checkObjects()
Check object elements in given template
at line 198
protected void
checkSetting(DOMNode $node, string $setting)
Test whether given setting is allowed
at line 226
protected bool
isDynamic(DOMElement $node)
Test whether given node contains dynamic content (XSL elements or attribute value template)
at line 255
protected DOMElement[]
getElements(string $tagName)
Get all elements the restriction applies to
at line 275
protected DOMElement[]
getObjectParams(DOMElement $object)
Get all param elements attached to given object