parseData($file); } function filterProps($file) { $data = $this->parseData($file); $propsToFilter = file(FILTER_PROPERTIES_FILE, FILE_IGNORE_NEW_LINES); foreach ($data as $d) { $allProps[] = $d['code']; } $filteredProps = array_diff($allProps, $propsToFilter); sort($filteredProps); return $filteredProps; } public function parseData($file) { $file = $this->path . $file; $rows = array_map(function ($v) { return str_getcsv($v, "\t"); }, file($file)); $header = array_shift($rows); $data = null; foreach ($rows as $row) { $data[] = @array_combine($header, $row); } unset($rows); return $data; } } ?>