add option to list all configured server connections
[shpub.git] / src / shpub / Command / Server.php
diff --git a/src/shpub/Command/Server.php b/src/shpub/Command/Server.php
new file mode 100644 (file)
index 0000000..59843d4
--- /dev/null
@@ -0,0 +1,22 @@
+<?php
+namespace shpub;
+
+class Command_Server
+{
+    public function __construct(Config $cfg)
+    {
+        $this->cfg = $cfg;
+    }
+
+    public function run($verbose)
+    {
+        foreach ($this->cfg->hosts as $key => $host) {
+            echo $key . "\n";
+            if ($verbose) {
+                echo '  URL:  ' . $host->server . "\n";
+                echo '  User: ' . $host->user . "\n";
+            }
+        }
+    }
+}
+?>