Пример #1
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;
         }
     }
 }
Пример #2
0
 /**
  * Constructor.
  */
 protected function __construct()
 {
     $this->defaultContextOptions = ['http' => Config::get('http'), 'ssl' => Config::get('https')];
 }