private function doDump(AssetInterface $asset, OutputInterface $output)
{
$target = rtrim($this->basePath, '/').'/'.str_replace('_controller/', '', $asset->getTargetPath());
if (!is_dir($dir = dirname($target))) {
$output->writeln('<info>[dir+]</info> '.$dir);
if (false === @mkdir($dir, 0777, true)) {
throw new \RuntimeException('Unable to create directory '.$dir);
}
}
$output->writeln('<info>[file+]</info> '.$target);
if (false === @file_put_contents($target, $asset->dump())) {
throw new \RuntimeException('Unable to write file '.$target);
}
}