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

Represent a CSS function. More...

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

Public Member Functions

 __construct (Token $token)
 
 __clone ()
 
 getName ()
 Return the functions's name. More...
 
 getValue ()
 Return the function's value. More...
 
 toTokenArray ()
 Return an array of Tokens that correspond to this object. More...
 
 __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 newFromName ( $name)
 Create a function by name. More...
 

Protected Attributes

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

Additional Inherited Members

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

Detailed Description

Represent a CSS function.

Constructor & Destructor Documentation

◆ __construct()

Wikimedia\CSS\Objects\CSSFunction::__construct ( Token  $token)
Parameters
Token$tokenFunction token starting the rule

Member Function Documentation

◆ getName()

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

Return the functions's name.

Returns
string

◆ getValue()

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

Return the function's value.

Returns
ComponentValueList

◆ newFromName()

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

Create a function by name.

Parameters
string$name
Returns
CSSFunction

◆ toTokenArray()

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

Return an array of Tokens that correspond to this object.

Returns
Token[]

Implements Wikimedia\CSS\Objects\CSSObject.


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