public function addDataSource($FileName) { $Storage = new FileStorage($this->Patch, $this->Build); $TMPDataName = strtolower(str_replace('.dbc', '', str_replace('.db2', '', $FileName))); $Data = $Storage->getFileData('DBC', $FileName); $this->Prefix = $Data->Prefix; $ReaderName = strtoupper($Storage->FileData['fileExtension']) . 'Reader'; $StorageReader = new $ReaderName($Storage->DBClientFiles, $Storage->FileData); $this->Tables['Data'][] = ['File' => $FileName, 'Table' => $Data->Prefix . $Data->FileData['tableName'], 'Format' => $Data->FileData['formatString'], 'Structure' => $Data->WorkingWith->Fields, 'Data' => $StorageReader->readFile()]; unset($Storage); }