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

void
check(DOMElement $template, Tag $tag)

Test for the set Flash restriction

__construct(string $maxSetting, bool $onlyIfDynamic = false)

Constructor

void
checkAttributes(DOMElement $embed)

Test given element's attributes

void
checkDynamicAttributes(DOMElement $embed)

Test whether given element has dynamic attributes that match the setting's name

void
checkDynamicParams(DOMElement $object)

Test the presence of dynamic params in given object

void
checkEmbeds()

Check embed elements in given template

void
checkObjects()

Check object elements in given template

void
checkSetting(DOMNode $node, string $setting)

Test whether given setting is allowed

bool
isDynamic(DOMElement $node)

Test whether given node contains dynamic content (XSL elements or attribute value template)

getElements(string $tagName)

Get all elements the restriction applies to

getObjectParams(DOMElement $object)

Get all param elements attached to given object

Details

at line 77
void check(DOMElement $template, Tag $tag)

Test for the set Flash restriction

Parameters

DOMElement $template

node

Tag $tag

Tag this template belongs to

Return Value

void

at line 64
__construct(string $maxSetting, bool $onlyIfDynamic = false)

Constructor

Parameters

string $maxSetting

Max setting allowed

bool $onlyIfDynamic

Whether this restriction applies only to elements using any kind of dynamic markup: XSL elements or attribute value templates

at line 90
protected void checkAttributes(DOMElement $embed)

Test given element's attributes

Parameters

DOMElement $embed

Context element

Return Value

void

at line 115
protected void checkDynamicAttributes(DOMElement $embed)

Test whether given element has dynamic attributes that match the setting's name

Parameters

DOMElement $embed

Context element

Return Value

void

at line 134
protected void checkDynamicParams(DOMElement $object)

Test the presence of dynamic params in given object

Parameters

DOMElement $object

Context element

Return Value

void

at line 154
protected void checkEmbeds()

Check embed elements in given template

Return Value

void

at line 171
protected void checkObjects()

Check object elements in given template

Return Value

void

at line 198
protected void checkSetting(DOMNode $node, string $setting)

Test whether given setting is allowed

Parameters

DOMNode $node

Target node

string $setting Setting

Return Value

void

at line 226
protected bool isDynamic(DOMElement $node)

Test whether given node contains dynamic content (XSL elements or attribute value template)

Parameters

DOMElement $node Node

Return Value

bool

at line 255
protected DOMElement[] getElements(string $tagName)

Get all elements the restriction applies to

Parameters

string $tagName

Element's name

Return Value

DOMElement[]

at line 275
protected DOMElement[] getObjectParams(DOMElement $object)

Get all param elements attached to given object

Parameters

DOMElement $object

Context element

Return Value

DOMElement[]