Ignore:
Timestamp:
Nov 24, 2020, 10:58:56 AM (4 years ago)
Author:
chronos
Message:
  • Modified: More static types added.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/NetworkConfigAirOS/Generators/SSHClient.php

    r874 r888  
    33class SSHClient
    44{
    5   var $SSHPath;
    6   var $Timeout;
    7   var $HostName;
    8   var $UserName;
    9   var $Password;
    10   var $PrivateKey;
    11   var $Debug;
     5  public string $SSHPath;
     6  public int $Timeout;
     7  public string $HostName;
     8  public string $UserName;
     9  public string $Password;
     10  public string $PrivateKey;
     11  public bool $Debug;
    1212
    1313  function __construct($HostName = 'localhost', $UserName = 'admin', $Password = '')
     
    2222  }
    2323
    24   function Execute($Commands)
     24  function Execute(string $Commands): array
    2525  {
    2626    $Commands = trim($Commands);
     
    3737      $Output = array();
    3838      exec($Command, $Output);
    39     } else $Output = '';
     39    } else $Output = array();
    4040    if ($this->Debug) print_r($Output);
    4141    return $Output;
Note: See TracChangeset for help on using the changeset viewer.