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

Legend:

Unmodified
Added
Removed
  • trunk/Modules/NetworkConfigRouterOS/Routerboard.php

    r887 r888  
    33class Routerboard
    44{
    5   var $SSHPath = '/usr/bin/ssh';
    6   var $Timeout = 3;
    7   var $HostName;
    8   var $UserName;
    9   var $Password;
    10   var $PrivateKey = '~/.ssh/id_rsa';
    11   var $MaxBurstLineCount = 100;
    12   var $Debug = false;
     5  public string $SSHPath = '/usr/bin/ssh';
     6  public int $Timeout = 3;
     7  public string $HostName;
     8  public string $UserName;
     9  public string $Password;
     10  public string $PrivateKey = '~/.ssh/id_rsa';
     11  public int $MaxBurstLineCount = 100;
     12  public bool $Debug = false;
    1313
    1414  function __construct($HostName = 'localhost', $UserName = 'admin', $Password = '')
     
    1919  }
    2020
    21   function Execute(array $Commands): array
     21  function Execute($Commands): array
    2222  {
    2323    $Output = array();
     
    7575      if (count($ResultLineParts) > 1)
    7676      {
    77         if ($ResultLineParts[1]{0} == '"') $ResultLineParts[1] = substr($ResultLineParts[1], 1, -1); // Remove quotes
     77        if ($ResultLineParts[1][0] == '"') $ResultLineParts[1] = substr($ResultLineParts[1], 1, -1); // Remove quotes
    7878        $List[substr($ResultLineParts[0], 0, -1)] = $ResultLineParts[1];
    7979      } else $List[substr($ResultLineParts[0], 0, -1)] = '';
     
    116116  }
    117117
    118   function ListGetPrint($Path, $Properties, $Conditions = array()): array
     118  function ListGetPrint(array $Path, array $Properties, array $Conditions = array()): array
    119119  {
    120120    $ConditionList = '';
Note: See TracChangeset for help on using the changeset viewer.