$this->compiler =
$compiler;
$this->dirName =
$dirName;
} public function generateData(GeneratorConfig
$config): void
{ $filesystem =
new Filesystem();
$localeScanner =
new LocaleScanner();
$reader =
new BundleEntryReader(new IntlBundleReader());
$writers =
$config->
getBundleWriters();
$tempDir =
sys_get_temp_dir().'/icu-data-'.
$this->dirName;
// Prepare filesystem directories
foreach ($writers as $targetDir =>
$writer) { $filesystem->
remove($targetDir.'/'.
$this->dirName
);
$filesystem->
mkdir($targetDir.'/'.
$this->dirName
);
} $filesystem->
remove($tempDir);
$filesystem->
mkdir($tempDir);