Documentation

Validate
in package

Table of Contents

Constants

CSS_GENERICFONT  = ['serif', 'sans-serif', 'monospace', 'cursive', 'fantasy', 'system-ui', 'math', 'emoji', 'fangsong']
CSS_WHITESPACE  = ['pre-wrap', 'normal', 'nowrap', 'pre', 'pre-line', 'initial', 'inherit']

Methods

validateCSSGenericFont()  : string
Validate generic font for fallback for html.
validateCSSWhiteSpace()  : string
Validate html css white-space value. It is expected that only pre-wrap and normal (default) are useful.

Constants

CSS_GENERICFONT

public mixed CSS_GENERICFONT = ['serif', 'sans-serif', 'monospace', 'cursive', 'fantasy', 'system-ui', 'math', 'emoji', 'fangsong']

CSS_WHITESPACE

public mixed CSS_WHITESPACE = ['pre-wrap', 'normal', 'nowrap', 'pre', 'pre-line', 'initial', 'inherit']

Methods

validateCSSGenericFont()

Validate generic font for fallback for html.

public static validateCSSGenericFont(string $value) : string
Parameters
$value : string

Generic font name

Return values
string

Value if legitimate, empty string if not

validateCSSWhiteSpace()

Validate html css white-space value. It is expected that only pre-wrap and normal (default) are useful.

public static validateCSSWhiteSpace(string $value) : string
Parameters
$value : string

CSS White space

Return values
string

value if valid, empty string if not


        
On this page

Search results