Example #1
0
    /**
     * @param InputInterface  $input
     * @param OutputInterface $output
     *
     * @return int|null|void
     */
    protected function execute(InputInterface $input, OutputInterface $output)
    {
        $this->output = new SymfonyStyle($input, $output);
        $web = $this->configuration->getPath('web');
        $files = ['.env' => 'APP_ENV=local', 'console' => <<<'PHP'
<?php
require 'vendor/autoload.php';

$app = new Madewithlove\Glue\Glue();
$app->console();
PHP
, $web . DS . 'index.php' => <<<'PHP'
<?php
require 'vendor/autoload.php';

$app = new Madewithlove\Glue\Glue();
$app->run();
PHP
];
        // Create folders
        foreach ($this->configuration->getPaths() as $path) {
            $this->create($path);
        }
        // Create files
        foreach ($files as $path => $contents) {
            $this->create($path, $contents);
        }
    }