protected function execute(InputInterface $input, OutputInterface $output)
 {
     $allow = $this->requiresConfirmation($input) === false || $this->receivedConfirmation($input, $output) === true;
     if (!$allow) {
         $output->writeln('<info>Aborting</info>');
         return;
     }
     Config::resetConfig();
     $output->writeln('<info>Config reset</info>');
 }
Exemplo n.º 2
0
 protected function loadFromVendors()
 {
     $this->servers = [];
     foreach (Config::get('hosts') as $credentials) {
         $vendor = $credentials['vendor'];
         $class = "Moccalotto\\SshPortal\\HostingVendors\\{$vendor}Vendor";
         if (class_exists($class)) {
             $this->importServers($class::fetchServers($credentials));
             continue;
         }
         if (class_exists($vendor)) {
             $this->importServers($vendor::fetchServers($credentials));
             continue;
         }
     }
 }
Exemplo n.º 3
0
 /**
  * Constructor.
  */
 protected function __construct()
 {
     $this->defaultContextOptions = ['http' => Config::get('http'), 'ssl' => Config::get('https')];
 }
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $output->writeln(json_encode(Config::all(), JSON_PRETTY_PRINT));
 }