private function generateDcaExtracts($cacheDir)
{
$processed = [];
/** @var SplFileInfo[] $files */
$files = $this->finder->findIn('dca')->files()->name('*.php');
foreach ($files as $file) {
if (in_array($file->getBasename(), $processed)) {
continue;
}
$processed[] = $file->getBasename();
$table = $file->getBasename('.php');
$extract = DcaExtractor::getInstance($table);
if (!$extract->isDbTable()) {
continue;
}
$this->filesystem->dumpFile(sprintf('%s/contao/sql/%s.php', $cacheDir, $table), sprintf("<?php\n\n%s\n\n%s\n\n%s\n\n%s\n\n%s\n\n\$this->blnIsDbTable = true;\n", sprintf('$this->arrMeta = %s;', var_export($extract->getMeta(), true)), sprintf('$this->arrFields = %s;', var_export($extract->getFields(), true)), sprintf('$this->arrOrderFields = %s;', var_export($extract->getOrderFields(), true)), sprintf('$this->arrKeys = %s;', var_export($extract->getKeys(), true)), sprintf('$this->arrRelations = %s;', var_export($extract->getRelations(), true))));
}
}