css-sanitizer
Classes to parse and sanitize CSS
Loading...
Searching...
No Matches
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.
 
 getEndTokenType ()
 Get the end token type.
 
 getValue ()
 Return the block's value.
 
 toTokenArray ()
 @inheritDoc
 
 __toString ()
 
- Public Member Functions inherited from Wikimedia\CSS\Objects\ComponentValue
 getPosition ()
 Get the position of this ComponentValue in the input stream.
 
 toComponentValueArray ()
 @inheritDoc
 

Static Public Member Functions

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

Protected Attributes

 $startTokenType
 
 $endTokenType
 
 $value
 
- Protected Attributes inherited from Wikimedia\CSS\Objects\ComponentValue
 $line = -1
 
 $pos = -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

◆ toTokenArray()

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

@inheritDoc

Implements Wikimedia\CSS\Objects\CSSObject.


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