public function __construct($name, $username, $keyLocation, $host, $port = 22)
 {
     $file = new Filesystem();
     if (!$file->isFile($keyLocation)) {
         throw new FileNotFoundException("Private key file doesn't exist at " . $keyLocation);
     }
     $this->keyLocation = $keyLocation;
     $this->port = $port;
     parent::__construct($name, $host, $username, $keyLocation);
 }
Example #2
0
 public function __construct($name, Credential $remote)
 {
     parent::__construct($name, $remote->host(), $remote->user(), ['key' => $remote->secret()]);
     $this->remote = $remote;
 }
Example #3
0
 public function __construct($dbName, $username, $password, $host = "localhost", $port = 3306)
 {
     $this->port = $port;
     parent::__construct($dbName, $username, $host, $password);
 }