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 | * @param string will specify the key to check 'type' or 'order' |
||
49 | * @param array $parsedConfigItem the sorting configuration to analyse |
||
50 | * @param bool $safe whether the current config has been deemed safe to use so far |
||
51 | * @return bool |
||
52 | */ |
||
53 | 13 | private function isSortingSafe($key,$parsedConfigItem, $safe) { |
|
60 | |||
61 | /** |
||
62 | * Determines if the background colour found in the config file is safe for web use |
||
63 | * |
||
64 | * @param array $parsedConfigItem the design configuration to analyse |
||
65 | * @param bool $safe whether the current config has been deemed safe to use so far |
||
66 | * |
||
67 | * @return bool |
||
68 | */ |
||
69 | 9 | private function isDesignColourSafe($parsedConfigItem, $safe) { |
|
77 | |||
78 | /** |
||
79 | * Validates the parsed sorting values against allowed values |
||
80 | * |
||
81 | * @param string $section the section in the sorting config to be analysed |
||
82 | * @param string $value the value found in that section |
||
83 | * |
||
84 | * @return bool |
||
85 | */ |
||
86 | 12 | private function sortingValidator($section, $value) { |
|
95 | |||
96 | } |
||
97 |