Skip to content

Instantly share code, notes, and snippets.

@cirpo

cirpo/Config.php Secret

Last active December 15, 2015 11:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cirpo/5abce3457f8eb6f526fd to your computer and use it in GitHub Desktop.
Save cirpo/5abce3457f8eb6f526fd to your computer and use it in GitHub Desktop.
<?php
class Config() {
private localBaseFolder;
private remoteBaseFolder;
private user;
}
<?php
class Host() {
public __construct($name, Config $config)
{
$this->name = $name;
$this->config = $config
}
}
<?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