-
-
Save cirpo/5abce3457f8eb6f526fd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Config() { | |
private localBaseFolder; | |
private remoteBaseFolder; | |
private user; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Host() { | |
public __construct($name, Config $config) | |
{ | |
$this->name = $name; | |
$this->config = $config | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Idephix\Idephix; | |
use Idephix\SSH\SshClient; | |
$config_1 = new Config(); | |
$config_2 = new Config(); | |
$host_1 = new Host('example.com', $config_1); | |
$host_2 = new Host('foo.com', $config_1); | |
$host_3 = new Host('bar.me', $config_2); | |
$host_4 = new Host('127.0.0.1', $config_2); | |
$hosts = new Collection(); | |
$hosts->add($host_1); | |
$hosts->add($host_2); | |
$hosts->add($host_3); | |
$hosts->add($host_4); | |
$idx = new Idephix(new SshClient(), $hosts); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment