Rule
in package
implements
Commentable, CSSElement, Positionable
Uses
Position
`Rule`s just have a string key (the rule) and a 'Value'.
In CSS, Rules are expressed as follows: “key: value[0][0] value[0][1], value[1][0] value[1][1];”
Interfaces, Classes and Traits
- Commentable
- CSSElement
- Represents any entity in the CSS that is encapsulated by a class.
- Positionable
- Represents a CSS item that may have a position in the source CSS document (line number and possibly column number).
Table of Contents
- $aIeHack : array<int, int>
- $bIsImportant : bool
- $mValue : RuleValueList|string|null
- $sRule : string
- __construct() : mixed
- __toString() : string
- addComments() : void
- addIeHack() : void
- addValue() : void
- Adds a value to the existing value. Value will be appended if a `RuleValueList` exists of the given type.
- getComments() : array<array-key, Comment>
- getIeHack() : array<int, int>
- getIsImportant() : bool
- getRule() : string
- getValue() : RuleValueList|string|null
- getValues() : array<int, array<int, RuleValueList>>
- render() : string
- setComments() : void
- setIeHack() : void
- setIsImportant() : void
- setRule() : void
- setValue() : void
- setValues() : RuleValueList
- listDelimiterForRule() : array<int, non-empty-string>
- Returns a list of delimiters (or separators).
Properties
$aIeHack
private
array<int, int>
$aIeHack
$bIsImportant
private
bool
$bIsImportant
$mValue
private
RuleValueList|string|null
$mValue
$sRule
private
string
$sRule
Methods
__construct()
public
__construct(string $sRule, int $iLineNo, int $iColNo) : mixed
Parameters
- $sRule : string
- $iLineNo : int
- $iColNo : int
Return values
mixed —__toString()
public
__toString() : string
Tags
Return values
string —addComments()
public
addComments(array<array-key, Comment> $aComments) : void
Parameters
- $aComments : array<array-key, Comment>
Return values
void —addIeHack()
public
addIeHack(int $iModifier) : void
Parameters
- $iModifier : int
Tags
Return values
void —addValue()
Adds a value to the existing value. Value will be appended if a `RuleValueList` exists of the given type.
public
addValue(RuleValueList|array<int, RuleValueList> $mValue[, string $sType = ' ' ]) : void
Otherwise, the existing value will be wrapped by one.
Parameters
- $mValue : RuleValueList|array<int, RuleValueList>
- $sType : string = ' '
Return values
void —getComments()
public
getComments() : array<array-key, Comment>
Return values
array<array-key, Comment> —getIeHack()
public
getIeHack() : array<int, int>
Tags
Return values
array<int, int> —getIsImportant()
public
getIsImportant() : bool
Return values
bool —getRule()
public
getRule() : string
Return values
string —getValue()
public
getValue() : RuleValueList|string|null
Return values
RuleValueList|string|null —getValues()
public
getValues() : array<int, array<int, RuleValueList>>
Tags
Return values
array<int, array<int, RuleValueList>> —render()
public
render(OutputFormat|null $oOutputFormat) : string
Parameters
- $oOutputFormat : OutputFormat|null
Return values
string —setComments()
public
setComments(array<array-key, Comment> $aComments) : void
Parameters
- $aComments : array<array-key, Comment>
Return values
void —setIeHack()
public
setIeHack(array<int, int> $aModifiers) : void
Parameters
- $aModifiers : array<int, int>
Tags
Return values
void —setIsImportant()
public
setIsImportant(bool $bIsImportant) : void
Parameters
- $bIsImportant : bool
Return values
void —setRule()
public
setRule(string $sRule) : void
Parameters
- $sRule : string
Return values
void —setValue()
public
setValue(RuleValueList|string|null $mValue) : void
Parameters
- $mValue : RuleValueList|string|null
Return values
void —setValues()
public
setValues(array<array-key, array<array-key, RuleValueList>> $aSpaceSeparatedValues) : RuleValueList
Parameters
- $aSpaceSeparatedValues : array<array-key, array<array-key, RuleValueList>>
Tags
Return values
RuleValueList —listDelimiterForRule()
Returns a list of delimiters (or separators).
private
static listDelimiterForRule(string $sRule) : array<int, non-empty-string>
The first item is the innermost separator (or, put another way, the highest-precedence operator). The sequence continues to the outermost separator (or lowest-precedence operator).
Parameters
- $sRule : string
