Documentation

CssColorModuleValueTrait

Module value checks for output classes that use CSS colors

Table of Contents

Methods

moduleValueIsValid()  : bool
note: we're not necessarily validating the several values, just checking the general syntax note: css4 colors are not included
getDefaultModuleValue()  : string
implements \chillerlan\QRCode\Output\QROutputAbstract::getDefaultModuleValue()
prepareModuleValue()  : string
implements \chillerlan\QRCode\Output\QROutputAbstract::prepareModuleValue()

Methods

moduleValueIsValid()

note: we're not necessarily validating the several values, just checking the general syntax note: css4 colors are not included

public static moduleValueIsValid(string $value) : bool

implements \chillerlan\QRCode\Output\QROutputInterface::moduleValueIsValid()

Parameters
$value : string
Tags
todo:

XSS proof

see
https://developer.mozilla.org/en-US/docs/Web/CSS/color_value
Return values
bool

getDefaultModuleValue()

implements \chillerlan\QRCode\Output\QROutputAbstract::getDefaultModuleValue()

protected getDefaultModuleValue(bool $isDark) : string
Parameters
$isDark : bool
Return values
string

prepareModuleValue()

implements \chillerlan\QRCode\Output\QROutputAbstract::prepareModuleValue()

protected prepareModuleValue(string $value) : string
Parameters
$value : string
Return values
string

        
On this page

Search results