move server and connect option registration out of cli
[shpub.git] / src / shpub / Command / Server.php
index 8553414..a3c52ee 100644 (file)
@@ -8,6 +8,21 @@ class Command_Server
         $this->cfg = $cfg;
     }
 
+    public static function opts(\Console_CommandLine $optParser)
+    {
+        $cmd = $optParser->addCommand('server');
+        $cmd->addOption(
+            'verbose',
+            array(
+                'short_name'  => '-v',
+                'long_name'   => '--verbose',
+                'description' => 'Show more server infos',
+                'action'      => 'StoreTrue',
+                'default'     => false,
+            )
+        );
+    }
+
     public function run($verbose)
     {
         foreach ($this->cfg->hosts as $key => $host) {