|
array< array-key, $aComments;protected array< int, $aContents;protected int $iLineNo;public function __construct( $iLineNo=0) { $this->aComments=[];$this-> | aContents = [] |
| Comment>
|
|
◆ __construct()
Sabberworm\CSS\CSSList\Document::__construct |
( |
| $iLineNo = 0 | ) |
|
◆ __toString()
Sabberworm\CSS\CSSList\CSSList::__toString |
( |
| ) |
|
|
inherited |
◆ addComments()
Sabberworm\CSS\CSSList\CSSList::addComments |
( |
array | $aComments | ) |
|
|
inherited |
◆ allDeclarationBlocks()
Sabberworm\CSS\CSSList\CSSBlockList::allDeclarationBlocks |
( |
array & | $aResult | ) |
|
|
protectedinherited |
- Parameters
-
array<int,DeclarationBlock> | $aResult |
- Return values
-
◆ allRuleSets()
Sabberworm\CSS\CSSList\CSSBlockList::allRuleSets |
( |
array & | $aResult | ) |
|
|
protectedinherited |
- Parameters
-
array<int,RuleSet> | $aResult |
- Return values
-
◆ allSelectors()
Sabberworm\CSS\CSSList\CSSBlockList::allSelectors |
( |
array & | $aResult, |
|
|
| $sSpecificitySearch = null ) |
|
protectedinherited |
- Parameters
-
| array<int,Selector> | $aResult |
string | null | $sSpecificitySearch | |
- Return values
-
◆ allValues()
Sabberworm\CSS\CSSList\CSSBlockList::allValues |
( |
| $oElement, |
|
|
array & | $aResult, |
|
|
| $sSearchString = null, |
|
|
| $bSearchInFunctionArguments = false ) |
|
protectedinherited |
- Parameters
-
CSSList | Rule | RuleSet | Value | $oElement | |
| array<int,Value> | $aResult |
string | null | $sSearchString | |
bool | $bSearchInFunctionArguments | |
- Return values
-
◆ append()
Sabberworm\CSS\CSSList\CSSList::append |
( |
| $oItem | ) |
|
|
inherited |
Appends an item to tje list of contents.
- Parameters
-
RuleSet | CSSList | Import | Charset | $oItem | |
- Return values
-
◆ createShorthands()
Sabberworm\CSS\CSSList\Document::createShorthands |
( |
| ) |
|
Create shorthands properties whenever possible.
- Return values
-
◆ expandShorthands()
Sabberworm\CSS\CSSList\Document::expandShorthands |
( |
| ) |
|
Expands all shorthand properties to their long value.
- Return values
-
◆ getAllDeclarationBlocks()
Sabberworm\CSS\CSSList\Document::getAllDeclarationBlocks |
( |
| ) |
|
Gets all DeclarationBlock
objects recursively.
- Return values
-
array<int,DeclarationBlock> | |
◆ getAllRuleSets()
Sabberworm\CSS\CSSList\Document::getAllRuleSets |
( |
| ) |
|
Returns all RuleSet
objects found recursively in the tree.
- Return values
-
◆ getAllSelectors()
Sabberworm\CSS\CSSList\Document::getAllSelectors |
( |
| ) |
|
Gets all DeclarationBlock
objects recursively.
- Return values
-
array<int,DeclarationBlock> | |
- Deprecated
- will be removed in version 9.0; use
getAllDeclarationBlocks()
instead
◆ getAllValues()
Sabberworm\CSS\CSSList\Document::getAllValues |
( |
| $mElement = null, |
|
|
| $bSearchInFunctionArguments = false ) |
Returns all Value
objects found recursively in the tree.
- Parameters
-
CSSList | RuleSet | string | $mElement | the CSSList or RuleSet to start the search from (defaults to the whole document). If a string is given, it is used as rule name filter. |
bool | $bSearchInFunctionArguments | whether to also return Value objects used as Function arguments. |
- Return values
-
- See also
- RuleSet->getRules()
◆ getComments()
Sabberworm\CSS\CSSList\CSSList::getComments |
( |
| ) |
|
|
inherited |
◆ getContents()
Sabberworm\CSS\CSSList\CSSList::getContents |
( |
| ) |
|
|
inherited |
- Return values
-
array<int,RuleSet|Import|Charset|CSSList> | |
◆ getLineNo()
Sabberworm\CSS\CSSList\CSSList::getLineNo |
( |
| ) |
|
|
inherited |
◆ insert()
Sabberworm\CSS\CSSList\CSSList::insert |
( |
| $oItem, |
|
|
| $oSibling ) |
|
inherited |
Insert an item before its sibling.
- Parameters
-
mixed | $oItem | The item. |
mixed | $oSibling | The sibling. |
◆ isRootList()
Sabberworm\CSS\CSSList\Document::isRootList |
( |
| ) |
|
◆ parse()
static Sabberworm\CSS\CSSList\Document::parse |
( |
ParserState | $oParserState | ) |
|
|
static |
◆ parseList()
static Sabberworm\CSS\CSSList\CSSList::parseList |
( |
ParserState | $oParserState, |
|
|
CSSList | $oList ) |
|
staticinherited |
- Return values
-
- Exceptions
-
UnexpectedTokenException | |
SourceException | |
◆ prepend()
Sabberworm\CSS\CSSList\CSSList::prepend |
( |
| $oItem | ) |
|
|
inherited |
Prepends an item to the list of contents.
- Parameters
-
RuleSet | CSSList | Import | Charset | $oItem | |
- Return values
-
◆ remove()
Sabberworm\CSS\CSSList\CSSList::remove |
( |
| $oItemToRemove | ) |
|
|
inherited |
Removes an item from the CSS list.
- Parameters
-
RuleSet | Import | Charset | CSSList | $oItemToRemove | May be a RuleSet (most likely a DeclarationBlock), a Import, a Charset or another CSSList (most likely a MediaQuery) |
- Return values
-
bool | whether the item was removed |
◆ removeDeclarationBlockBySelector()
Sabberworm\CSS\CSSList\CSSList::removeDeclarationBlockBySelector |
( |
| $mSelector, |
|
|
| $bRemoveAll = false ) |
|
inherited |
Removes a declaration block from the CSS list if it matches all given selectors.
- Parameters
-
| DeclarationBlock|array<array-key,Selector>|string | $mSelector the selectors to match |
bool | $bRemoveAll | whether to stop at the first declaration block found or remove all blocks |
- Return values
-
◆ render()
Sabberworm\CSS\CSSList\Document::render |
( |
OutputFormat | $oOutputFormat = null | ) |
|
Overrides render()
to make format argument optional.
- Parameters
-
OutputFormat | null | $oOutputFormat | |
- Return values
-
Reimplemented from Sabberworm\CSS\CSSList\CSSList.
◆ replace()
Sabberworm\CSS\CSSList\CSSList::replace |
( |
| $oOldItem, |
|
|
| $mNewItem ) |
|
inherited |
Replaces an item from the CSS list.
- Parameters
-
RuleSet | Import | Charset | CSSList | $oOldItem | May be a RuleSet (most likely a DeclarationBlock ), an Import , a Charset or another CSSList (most likely a MediaQuery ) |
- Return values
-
◆ setComments()
Sabberworm\CSS\CSSList\CSSList::setComments |
( |
array | $aComments | ) |
|
|
inherited |
◆ setContents()
Sabberworm\CSS\CSSList\CSSList::setContents |
( |
array | $aContents | ) |
|
|
inherited |
- Parameters
-
array<int,RuleSet|Import|Charset|CSSList> | $aContents |
◆ splice()
Sabberworm\CSS\CSSList\CSSList::splice |
( |
| $iOffset, |
|
|
| $iLength = null, |
|
|
| $mReplacement = null ) |
|
inherited |
Splices the list of contents.
- Parameters
-
int | $iOffset | |
int | $iLength | |
| array<int,RuleSet|CSSList|Import|Charset> | $mReplacement |
- Return values
-
The documentation for this class was generated from the following file:
- lib/php-css-parser/CSSList/Document.php