ConfigValidator

Validates parsed configuration elements

package

OCA\Gallery\Config

Methods

Determines if the content of that sub-section is safe for web use

isConfigSafe(string $key, array $parsedConfigItem) : boolean

Arguments

$key

string

the configuration sub-section identifier

$parsedConfigItem

array

the configuration for a sub-section

Response

boolean

Determines if the background colour found in the config file is safe for web use

isDesignColourSafe(array $parsedConfigItem, boolean $safe) : boolean

Arguments

$parsedConfigItem

array

the design configuration to analyse

$safe

boolean

whether the current config has been deemed safe to use so far

Response

boolean

Determines if the sorting type found in the config file is safe for web use

isSortingSafe( $key, array $parsedConfigItem, boolean $safe) : boolean

Arguments

$key

$parsedConfigItem

array

the sorting configuration to analyse

$safe

boolean

whether the current config has been deemed safe to use so far

Response

boolean

Validates the parsed sorting values against allowed values

sortingValidator(string $section, string $value) : boolean

Arguments

$section

string

the section in the sorting config to be analysed

$value

string

the value found in that section

Response

boolean