css-sanitizer
Classes to parse and sanitize CSS
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. More...
 
 getPrelude ()
 Return the at-rule's prelude. More...
 
 getBlock ()
 Return the at-rule's block. More...
 
 setBlock (SimpleBlock $block=null)
 Set the block. More...
 
 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. More...
 

Static Public Member Functions

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

Protected Attributes

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

Additional Inherited Members

- Public Attributes inherited from Wikimedia\CSS\Objects\Rule
 $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

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