PHP Class Sabberworm\CSS\CSSList\CSSList

Also, it may contain Import and Charset objects stemming from @-rules.
Afficher le fichier Open project: sabberworm/php-css-parser Class Usage Examples

Protected Properties

Свойство Type Description
$aComments
$aContents
$iLineNo

Méthodes publiques

Méthode Description
__construct ( $iLineNo )
__toString ( )
addComments ( array $aComments )
append ( $oItem )
getComments ( ) : array
getContents ( )
getLineNo ( ) : integer
isRootList ( ) Return true if the list can not be further outdented. Only important when rendering.
remove ( Sabberworm\CSS\RuleSet\RuleSet | Import | Charset | CSSList $oItemToRemove ) Removes an item from the CSS list.
removeDeclarationBlockBySelector ( array | string $mSelector, boolean $bRemoveAll = false ) Removes a declaration block from the CSS list if it matches all given selectors.
render ( Sabberworm\CSS\OutputFormat $oOutputFormat )
setComments ( array $aComments )
setContents ( array $aContents ) Set the contents.

Method Details

__construct() public méthode

public __construct ( $iLineNo )

__toString() public méthode

public __toString ( )

addComments() public méthode

public addComments ( array $aComments )
$aComments array Array of comments.

append() public méthode

public append ( $oItem )

getComments() public méthode

public getComments ( ) : array
Résultat array

getContents() public méthode

public getContents ( )

getLineNo() public méthode

public getLineNo ( ) : integer
Résultat integer

isRootList() abstract public méthode

Return true if the list can not be further outdented. Only important when rendering.
abstract public isRootList ( )

remove() public méthode

Removes an item from the CSS list.
public remove ( Sabberworm\CSS\RuleSet\RuleSet | Import | Charset | CSSList $oItemToRemove )
$oItemToRemove Sabberworm\CSS\RuleSet\RuleSet | Import | Charset | CSSList May be a RuleSet (most likely a DeclarationBlock), a Import, a Charset or another CSSList (most likely a MediaQuery)

removeDeclarationBlockBySelector() public méthode

Removes a declaration block from the CSS list if it matches all given selectors.
public removeDeclarationBlockBySelector ( array | string $mSelector, boolean $bRemoveAll = false )
$mSelector array | string The selectors to match.
$bRemoveAll boolean Whether to stop at the first declaration block found or remove all blocks

render() public méthode

public render ( Sabberworm\CSS\OutputFormat $oOutputFormat )
$oOutputFormat Sabberworm\CSS\OutputFormat

setComments() public méthode

public setComments ( array $aComments )
$aComments array Array containing Comment objects.

setContents() public méthode

Set the contents.
public setContents ( array $aContents )
$aContents array Objects to set as content.

Property Details

$aComments protected_oe property

protected $aComments

$aContents protected_oe property

protected $aContents

$iLineNo protected_oe property

protected $iLineNo