1 | <?php |
||
9 | class Column extends Analyse implements AnalyseInterface |
||
10 | { |
||
11 | /** |
||
12 | * Validate that all fields are of the correct type, format and pattern. |
||
13 | * This also checks that each CSV row has the expected number of columns. |
||
14 | * |
||
15 | * @return boolean Is all data lexically valid. |
||
16 | */ |
||
17 | 30 | public function validate() |
|
29 | |||
30 | |||
31 | /** |
||
32 | * Validate that all mandatory columns are present. |
||
33 | * |
||
34 | * @return boolean Are all mandatory columns present. |
||
35 | */ |
||
36 | 30 | private function validateMandatoryColumns() |
|
55 | |||
56 | |||
57 | /** |
||
58 | * Check that there are no columns in the CSV that are not specified in the schema. |
||
59 | * |
||
60 | * @return boolean Are all the CSV columns specified in the schema. |
||
61 | */ |
||
62 | 28 | private function validateUnspecifiedColumns() |
|
79 | } |