1 | <?php |
||
20 | class ConfigValidator { |
||
21 | |||
22 | /** |
||
23 | * Determines if the content of that sub-section is safe for web use |
||
24 | * |
||
25 | * @param string $key the configuration sub-section identifier |
||
26 | * @param array $parsedConfigItem the configuration for a sub-section |
||
27 | * |
||
28 | * @return bool |
||
29 | */ |
||
30 | 21 | public function isConfigSafe($key, $parsedConfigItem) { |
|
45 | |||
46 | /** |
||
47 | * Determines if the sorting type found in the config file is safe for web use |
||
48 | * |
||
49 | * @param string $key will specify the key to check 'type' or 'order' |
||
50 | * @param array $parsedConfigItem the sorting configuration to analyse |
||
51 | * @param bool $safe whether the current config has been deemed safe to use so far |
||
52 | * |
||
53 | * @return bool |
||
54 | */ |
||
55 | 13 | private function isSortingSafe($key, $parsedConfigItem, $safe) { |
|
62 | |||
63 | /** |
||
64 | * Determines if the background colour found in the config file is safe for web use |
||
65 | * |
||
66 | * @param array $parsedConfigItem the design configuration to analyse |
||
67 | * @param bool $safe whether the current config has been deemed safe to use so far |
||
68 | * |
||
69 | * @return bool |
||
70 | */ |
||
71 | 9 | private function isDesignColourSafe($parsedConfigItem, $safe) { |
|
79 | |||
80 | /** |
||
81 | * Validates the parsed sorting values against allowed values |
||
82 | * |
||
83 | * @param string $section the section in the sorting config to be analysed |
||
84 | * @param string $value the value found in that section |
||
85 | * |
||
86 | * @return bool |
||
87 | */ |
||
88 | 12 | private function sortingValidator($section, $value) { |
|
97 | |||
98 | } |
||
99 |