css-sanitizer
Classes to parse and sanitize CSS
Wikimedia\CSS\Objects\SimpleBlock Class Reference

Represent a CSS simple block. More...

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

Public Member Functions

 __construct (Token $token)
 
 __clone ()
 
 getStartTokenType ()
 Get the start token type. More...
 
 getEndTokenType ()
 Get the end token type. More...
 
 getValue ()
 Return the block's value. More...
 
 toTokenArray ()
 @inheritDoc
 
 __toString ()
 
- Public Member Functions inherited from Wikimedia\CSS\Objects\ComponentValue
 getPosition ()
 Get the position of this ComponentValue in the input stream. More...
 
 toComponentValueArray ()
 @inheritDoc
 

Static Public Member Functions

static newFromDelimiter ( $delimiter)
 Create simple block by token type. More...
 
static matchingDelimiter ( $delim)
 Return the ending delimiter for a starting delimiter. More...
 

Public Attributes

 $endTokenType
 
- Public Attributes inherited from Wikimedia\CSS\Objects\ComponentValue
 $pos = -1
 

Protected Attributes

 $startTokenType
 
 $value
 
- Protected Attributes inherited from Wikimedia\CSS\Objects\ComponentValue
 $line = -1
 

Detailed Description

Represent a CSS simple block.

Constructor & Destructor Documentation

◆ __construct()

Wikimedia\CSS\Objects\SimpleBlock::__construct ( Token  $token)
Parameters
Token$tokenAssociated token

Member Function Documentation

◆ getEndTokenType()

Wikimedia\CSS\Objects\SimpleBlock::getEndTokenType ( )

Get the end token type.

Returns
string

◆ getStartTokenType()

Wikimedia\CSS\Objects\SimpleBlock::getStartTokenType ( )

Get the start token type.

Returns
string

◆ getValue()

Wikimedia\CSS\Objects\SimpleBlock::getValue ( )

Return the block's value.

Returns
ComponentValueList

◆ matchingDelimiter()

static Wikimedia\CSS\Objects\SimpleBlock::matchingDelimiter (   $delim)
static

Return the ending delimiter for a starting delimiter.

Parameters
string$delimToken::T_* constant
Returns
string|null Matching Token::T_* constant, if any

◆ newFromDelimiter()

static Wikimedia\CSS\Objects\SimpleBlock::newFromDelimiter (   $delimiter)
static

Create simple block by token type.

Parameters
string$delimiterToken::T_LEFT_PAREN, Token::T_LEFT_BRACE, or Token::T_LEFT_BRACKET
Returns
SimpleBlock

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