|
|
$this | aComments = [] |
| |
|
string const | BLOCK_RULES = 'media/document/supports/region-style/font-feature-values' |
| |
|
string const | SET_RULES = 'font-face/counter-style/page/swash/styleset/annotation' |
| | … and more font-specific ones (to be used inside font-feature-values)
|
| |
◆ __construct()
| Sabberworm\CSS\RuleSet\AtRuleSet::__construct |
( |
| $sType, |
|
|
| $sArgs = '', |
|
|
| $iLineNo = 0 ) |
- Parameters
-
| string | $sType | |
| string | $sArgs | |
| int | $iLineNo | |
◆ __toString()
| Sabberworm\CSS\RuleSet\AtRuleSet::__toString |
( |
| ) |
|
◆ addComments()
| Sabberworm\CSS\RuleSet\RuleSet::addComments |
( |
array | $aComments | ) |
|
|
inherited |
◆ addRule()
| Sabberworm\CSS\RuleSet\RuleSet::addRule |
( |
Rule | $oRule, |
|
|
| $oSibling = null ) |
|
inherited |
◆ atRuleArgs()
| Sabberworm\CSS\RuleSet\AtRuleSet::atRuleArgs |
( |
| ) |
|
◆ atRuleName()
| Sabberworm\CSS\RuleSet\AtRuleSet::atRuleName |
( |
| ) |
|
◆ getComments()
| Sabberworm\CSS\RuleSet\RuleSet::getComments |
( |
| ) |
|
|
inherited |
◆ getLineNo()
| Sabberworm\CSS\RuleSet\RuleSet::getLineNo |
( |
| ) |
|
|
inherited |
◆ getRulesAssoc()
| Sabberworm\CSS\RuleSet\RuleSet::getRulesAssoc |
( |
| $mRule = null | ) |
|
|
inherited |
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.
- Parameters
-
| Rule | string | null | $mRule | $mRule Pattern to search for. If null, returns all rules. If the pattern ends with a dash, all rules starting with the pattern are returned as well as one matching the pattern with the dash excluded. Passing a Rule behaves like calling getRules($mRule->getRule()). |
- Return values
-
◆ parseRuleSet()
| static Sabberworm\CSS\RuleSet\RuleSet::parseRuleSet |
( |
ParserState | $oParserState, |
|
|
RuleSet | $oRuleSet ) |
|
staticinherited |
- Return values
-
- Exceptions
-
| UnexpectedTokenException | |
| UnexpectedEOFException | |
◆ removeRule()
| Sabberworm\CSS\RuleSet\RuleSet::removeRule |
( |
| $mRule | ) |
|
|
inherited |
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()).
- Parameters
-
| Rule | string | null | $mRule | pattern to remove. If $mRule is null, all rules are removed. If the pattern ends in a dash, all rules starting with the pattern are removed as well as one matching the pattern with the dash excluded. Passing a Rule behaves matches by identity. |
- Return values
-
◆ render()
| Sabberworm\CSS\RuleSet\AtRuleSet::render |
( |
| $oOutputFormat | ) |
|
◆ renderRules()
| Sabberworm\CSS\RuleSet\RuleSet::renderRules |
( |
OutputFormat | $oOutputFormat | ) |
|
|
protectedinherited |
◆ setComments()
| Sabberworm\CSS\RuleSet\RuleSet::setComments |
( |
array | $aComments | ) |
|
|
inherited |
◆ setRules()
| Sabberworm\CSS\RuleSet\RuleSet::setRules |
( |
array | $aRules | ) |
|
|
inherited |
Overrides all the rules of this set.
- Parameters
-
| array<array-key,Rule> | $aRules The rules to override with. |
- Return values
-
The documentation for this class was generated from the following file:
- lib/php-css-parser/src/RuleSet/AtRuleSet.php