Kirby\Cli\Command\Install\Htaccess::execute PHP Method

execute() protected method

protected execute ( Symfony\Component\Console\Input\InputInterface $input, Symfony\Component\Console\Output\OutputInterface $output )
$input Symfony\Component\Console\Input\InputInterface
$output Symfony\Component\Console\Output\OutputInterface
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $file = $this->dir() . '/.htaccess';
        if (file_exists($file)) {
            throw new RuntimeException('The .htaccess file already exists. Please remove the old one it first.');
        }
        $download = util::download('https://raw.githubusercontent.com/getkirby/starterkit/master/.htaccess');
        file_put_contents($file, $download);
        $output->writeln('');
        $output->writeln('<comment>The .htaccess has been installed!</comment>');
        $output->writeln('');
    }