private function copyStatic()
{
$config = $this->getSiteConfig();
$inDir = new \SplFileInfo($this->getProjectDir());
$outDir = new \SplFileInfo($this->getOutputDir());
$skip = isset($config['skip']) ? $config['skip'] : array();
if (isset($config['copy'])) {
$to_copy = (array) $config['copy'];
} else {
$to_copy = array();
}
// media folder is hardcoded into copy
// we should remove this when we can break BC
// this is better located in the skeleton config.yml
$to_copy = array_merge(array('media'), $to_copy);
$to_copy = array_unique($to_copy);
foreach ($to_copy as $file) {
$fileInfo = new \SplFileInfo($inDir->getPathname() . DIRECTORY_SEPARATOR . $file);
if ($fileInfo->isDir()) {
$this->tryToCopyFolder($fileInfo, $inDir, $outDir, $skip);
} else {
$this->tryToCopyFile($fileInfo, $inDir, $outDir, $skip);
}
}
return $this;
}