Static utility functions.
More...
|
static | assertAllInstanceOf (array $array, $class, $what) |
| Check that all elements in an array implement a particular class.
|
|
static | assertAllTokensOfType (array $array, $type, $what) |
| Check that a set of tokens are all the same type.
|
|
static | findFirstNonWhitespace ( $list) |
| Find the first non-whitespace ComponentValue in a list.
|
|
static | stringify ( $object, $options=[]) |
| Turn a CSSObject into a string.
|
|
Static utility functions.
◆ assertAllInstanceOf()
static Wikimedia\CSS\Util::assertAllInstanceOf |
( |
array | $array, |
|
|
| $class, |
|
|
| $what ) |
|
static |
Check that all elements in an array implement a particular class.
- Parameters
-
array | $array | |
string | $class | |
string | $what | Describe the array being checked |
- Exceptions
-
◆ assertAllTokensOfType()
static Wikimedia\CSS\Util::assertAllTokensOfType |
( |
array | $array, |
|
|
| $type, |
|
|
| $what ) |
|
static |
Check that a set of tokens are all the same type.
- Parameters
-
Token[] | $array | |
string | $type | |
string | $what | Describe the array being checked |
- Exceptions
-
◆ findFirstNonWhitespace()
static Wikimedia\CSS\Util::findFirstNonWhitespace |
( |
| $list | ) |
|
|
static |
Find the first non-whitespace ComponentValue in a list.
- Parameters
-
TokenList | ComponentValueList | $list | |
- Returns
- ComponentValue|null
◆ stringify()
static Wikimedia\CSS\Util::stringify |
( |
| $object, |
|
|
| $options = [] ) |
|
static |
Turn a CSSObject into a string.
- Parameters
-
CSSObject | CSSObject[] | $object | |
array | $options | Serialization options:
- minify: (bool) Skip comments and insignificant tokens
|
- Returns
- string
The documentation for this class was generated from the following file: