/** * Load the configuration file * * @return \ClickRain\Breeze\Configuration */ protected function load() { $breezeFile = breeze_config_path() . '/Breeze.yaml'; if (!file_exists($breezeFile)) { echo "Breeze.yaml not found.\n"; exit(1); } $config = new Configuration(); $config->load($breezeFile); return $config; }
/** * Execute the command. * * @return void */ public function fire() { $basePath = breeze_config_path(); if (is_dir($basePath)) { $this->output->writeln(sprintf('Breeze directory %s already exists. Skipping...', $basePath)); } else { $this->output->writeln(sprintf('Creating breeze configuration directory %s... <info>✔</info>', $basePath)); mkdir($basePath); } $sitesPath = $basePath . DIRECTORY_SEPARATOR . 'sites-available'; if (is_dir($sitesPath)) { $this->output->writeln('Breeze sites directory already exists. Skipping...'); } else { $this->output->writeln('Creating breeze sites directory... <info>✔</info>'); mkdir($sitesPath); } $configFile = $basePath . DIRECTORY_SEPARATOR . 'Breeze.yaml'; if (file_exists($configFile)) { $this->output->writeln('Breeze.yaml file already exists. Skipping...'); } else { $this->output->writeln('Creating Breeze.yaml file... <info>✔</info>'); copy(breeze_app_path() . '/stubs/Breeze.yaml', $configFile); } }
/** * Execute the command. * * @return void */ public function fire() { $command = $this->executable() . ' ' . breeze_config_path() . DIRECTORY_SEPARATOR . 'Breeze.yaml'; passthru($command); }