Ejemplo n.º 1
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     parent::execute($input, $output);
     $name = $input->getArgument('name');
     $path = $input->getArgument('path');
     $cfg = $this->getSelimConfig($input);
     if (!$cfg->siteExists($name)) {
         $cfg->addSite($name, $path);
         $cfg->write();
         echo "added: '{$name}'" . PHP_EOL;
     } else {
         echo "Site with name '{$name}' already exists!" . PHP_EOL;
     }
 }
Ejemplo n.º 2
0
 protected function configure()
 {
     parent::configure();
     $this->setName('find')->setDescription('Find silverstripe sites on your hdd')->addArgument('path', InputArgument::REQUIRED, 'Path where the script should start searching recursively')->addOption('skip-known-paths', 's', InputOption::VALUE_NONE, 'Skip all paths which are already in your selim config');
 }
Ejemplo n.º 3
0
 protected function configure()
 {
     parent::configure();
     $this->setName('security')->setDescription('check security of a site')->addArgument('name', InputArgument::REQUIRED, 'Identifier for your Site');
 }
Ejemplo n.º 4
0
 protected function configure()
 {
     parent::configure();
     $this->setName('rm')->setDescription('Remove a Site')->addArgument('name', InputArgument::REQUIRED, 'Identifier for your Site');
 }
Ejemplo n.º 5
0
 protected function configure()
 {
     parent::configure();
     $this->setName('start')->setDescription('Analyze all sites added.')->addOption('filter-name', null, InputOption::VALUE_REQUIRED, 'regex, filter sites by name')->addOption('filter-version', null, InputOption::VALUE_REQUIRED, 'regex, filter sites by version')->addOption('filter-module', null, InputOption::VALUE_REQUIRED, 'regex, filter sites by installed modules')->addOption('format', null, InputOption::VALUE_REQUIRED, 'Define a output format.')->addOption('table', null, InputOption::VALUE_NONE, 'Print all sites as a table')->addOption('filter-da', null, InputOption::VALUE_NONE, 'regex, filter sites where Security::setDefaultAdmin() is used in config.php')->addOption('filter-env', null, InputOption::VALUE_REQUIRED, 'regex, filter sites by environment type');
 }