+ public static function opts(\Console_CommandLine $optParser)
+ {
+ $cmd = $optParser->addCommand('server');
+ $cmd->description = 'List all connections';
+ $cmd->addOption(
+ 'verbose',
+ array(
+ 'short_name' => '-v',
+ 'long_name' => '--verbose',
+ 'description' => 'Show more server infos',
+ 'action' => 'StoreTrue',
+ 'default' => false,
+ )
+ );
+ $cmd->addArgument(
+ 'server',
+ [
+ 'default' => null,
+ 'optional' => true,
+ 'description' => 'Connection name',
+ ]
+ );
+ }
+
+ public function run($server, $verbose)
+ {
+ if ($server === null) {
+ $this->showConnections($verbose);
+ } else {
+ $this->showConnectionDetails($server, $verbose);
+ }
+ }
+
+ /**
+ * Show a list of all connections
+ *
+ * @param bool $verbose Show some details
+ *
+ * @return void
+ */
+ protected function showConnections($verbose)