move server and connect option registration out of cli
[shpub.git] / src / shpub / Command / Server.php
index 8553414b214c9170f5e6daab9cd03d84313ed2bf..a3c52eed2bf34cdd6841d22806c44144510cb6f7 100644 (file)
@@ -8,6 +8,21 @@ class Command_Server
         $this->cfg = $cfg;
     }
 
         $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) {
     public function run($verbose)
     {
         foreach ($this->cfg->hosts as $key => $host) {