Magestead\Command\NewCommand::copyConfigFiles PHP Метод

copyConfigFiles() защищенный Метод

protected copyConfigFiles ( $source, $target, Symfony\Component\Console\Output\OutputInterface $output )
$source
$target
$output Symfony\Component\Console\Output\OutputInterface
    protected function copyConfigFiles($source, $target, OutputInterface $output)
    {
        try {
            $progress = new ProgressBar($output, 3720);
            $progress->start();
            foreach ($iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($source, \RecursiveDirectoryIterator::SKIP_DOTS), \RecursiveIteratorIterator::SELF_FIRST) as $item) {
                if ($item->isDir()) {
                    mkdir($target . DIRECTORY_SEPARATOR . $iterator->getSubPathName());
                } else {
                    copy($item, $target . DIRECTORY_SEPARATOR . $iterator->getSubPathName());
                }
                $progress->advance();
            }
            $progress->finish();
            echo "\n";
        } catch (\Exception $e) {
            $output->writeln('<error>There was an error while setting up the project structure</error>');
        }
    }