phpseclib\Net\SCP::__construct PHP Method

__construct() public method

Connects to an SSH server
public __construct ( SSH1 | SSH2 $ssh ) : SCP
$ssh SSH1 | SSH2
return SCP
    function __construct($ssh)
    {
        if ($ssh instanceof SSH2) {
            $this->mode = self::MODE_SSH2;
        } elseif ($ssh instanceof SSH1) {
            $this->packet_size = 50000;
            $this->mode = self::MODE_SSH1;
        } else {
            return;
        }
        $this->ssh = $ssh;
    }