See Release Notes
Long Term Support Release
Differences Between: [Versions 310 and 401] [Versions 311 and 401] [Versions 39 and 401] [Versions 400 and 401]
(no description)
File Size: | 326 lines (11 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
RuleSet:: (13 methods):
__construct()
parseRuleSet()
getLineNo()
addRule()
getRules()
setRules()
getRulesAssoc()
removeRule()
__toString()
render()
addComments()
getComments()
setComments()
__construct($iLineNo = 0) X-Ref |
param: int $iLineNo |
parseRuleSet(ParserState $oParserState, RuleSet $oRuleSet) X-Ref |
return: void |
getLineNo() X-Ref |
return: int |
addRule(Rule $oRule, Rule $oSibling = null) X-Ref |
param: Rule|null $oSibling return: void |
getRules($mRule = null) X-Ref |
Returns all rules matching the given rule name param: Rule|string|null $mRule return: array<int, Rule> |
setRules(array $aRules) X-Ref |
Overrides all the rules of this set. param: array<array-key, Rule> $aRules The rules to override with. return: void |
getRulesAssoc($mRule = null) X-Ref |
Returns all rules matching the given pattern and returns them in an associative array with the rule’s name as keys. This method exists mainly for backwards-compatibility and is really only partially useful. Note: This method loses some information: Calling this (with an argument of `background-`) on a declaration block like `{ background-color: green; background-color; rgba(0, 127, 0, 0.7); }` will only yield an associative array containing the rgba-valued rule while `getRules()` would yield an indexed array containing both. param: Rule|string|null $mRule $mRule return: array<string, Rule> |
removeRule($mRule) X-Ref |
Removes a rule from this RuleSet. This accepts all the possible values that `getRules()` accepts. If given a Rule, it will only remove this particular rule (by identity). If given a name, it will remove all rules by that name. Note: this is different from pre-v.2.0 behaviour of PHP-CSS-Parser, where passing a Rule instance would remove all rules with the same name. To get the old behaviour, use `removeRule($oRule->getRule())`. param: Rule|string|null $mRule return: void |
__toString() X-Ref |
return: string |
render(OutputFormat $oOutputFormat) X-Ref |
return: string |
addComments(array $aComments) X-Ref |
param: array<string, Comment> $aComments return: void |
getComments() X-Ref |
return: array<string, Comment> |
setComments(array $aComments) X-Ref |
param: array<string, Comment> $aComments return: void |