css-sanitizer
Classes to parse and sanitize CSS
Loading...
Searching...
No Matches
Wikimedia\CSS\Objects\AtRule Class Reference

Represent a CSS at-rule. More...

+ Inheritance diagram for Wikimedia\CSS\Objects\AtRule:
+ Collaboration diagram for Wikimedia\CSS\Objects\AtRule:

Public Member Functions

 __construct (Token $token)
 
 __clone ()
 
 getName ()
 Return the at-rule's name, e.g.
 
 getPrelude ()
 Return the at-rule's prelude.
 
 getBlock ()
 Return the at-rule's block.
 
 setBlock (?SimpleBlock $block=null)
 Set the block.
 
 toTokenArray ()
 @inheritDoc
 
 toComponentValueArray ()
 @inheritDoc
 
 __toString ()
 
- Public Member Functions inherited from Wikimedia\CSS\Objects\Rule
 getPosition ()
 Get the position of this Declaration in the input stream.
 

Static Public Member Functions

static newFromName ( $name)
 Create an at-rule by name.
 

Protected Attributes

 $name
 
 $prelude
 
 $block = null
 
- Protected Attributes inherited from Wikimedia\CSS\Objects\Rule
 $line = -1
 
 $pos = -1
 

Detailed Description

Represent a CSS at-rule.

Constructor & Destructor Documentation

◆ __construct()

Wikimedia\CSS\Objects\AtRule::__construct ( Token $token)
Parameters
Token$tokenAn at-keyword token

Reimplemented from Wikimedia\CSS\Objects\Rule.

Member Function Documentation

◆ getBlock()

Wikimedia\CSS\Objects\AtRule::getBlock ( )

Return the at-rule's block.

Returns
SimpleBlock|null

◆ getName()

Wikimedia\CSS\Objects\AtRule::getName ( )

Return the at-rule's name, e.g.

"media"

Returns
string

◆ getPrelude()

Wikimedia\CSS\Objects\AtRule::getPrelude ( )

Return the at-rule's prelude.

Returns
ComponentValueList

◆ newFromName()

static Wikimedia\CSS\Objects\AtRule::newFromName ( $name)
static

Create an at-rule by name.

Parameters
string$name
Returns
AtRule

◆ setBlock()

Wikimedia\CSS\Objects\AtRule::setBlock ( ?SimpleBlock $block = null)

Set the block.

Parameters
SimpleBlock | null$block

◆ toComponentValueArray()

Wikimedia\CSS\Objects\AtRule::toComponentValueArray ( )

@inheritDoc

Implements Wikimedia\CSS\Objects\CSSObject.

◆ toTokenArray()

Wikimedia\CSS\Objects\AtRule::toTokenArray ( )

@inheritDoc

Implements Wikimedia\CSS\Objects\CSSObject.


The documentation for this class was generated from the following file: