From: Gunnar Wrobel
Date: Wed, 30 Jun 2010 08:33:30 +0000 (+0200)
Subject: Cleanup first draft.
X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=135660463335cabaf8f5ddbeb89df6fa5fab502c;p=horde.git
Cleanup first draft.
---
diff --git a/framework/Qc/lib/Horde/Qc/Autoloader.php b/framework/Qc/lib/Horde/Qc/Autoloader.php
new file mode 100644
index 000000000..e91dad399
--- /dev/null
+++ b/framework/Qc/lib/Horde/Qc/Autoloader.php
@@ -0,0 +1,22 @@
+addClassPathMapper(new Horde_Autoloader_ClassPathMapper_Default($path));
+ }
+ }
+ }
+}
+
+$__autoloader = new Horde_Qc_Autoloader();
+$__autoloader->registerAutoloader();
diff --git a/framework/Qc/lib/Horde/Qc/Config/Cli.php b/framework/Qc/lib/Horde/Qc/Config/Cli.php
index 66f0ad998..3e4c72314 100644
--- a/framework/Qc/lib/Horde/Qc/Config/Cli.php
+++ b/framework/Qc/lib/Horde/Qc/Config/Cli.php
@@ -29,11 +29,7 @@
erver
*/
class Horde_Qc_Config_Cli
-implements Horde_Qc_Config_Interface
{
-
- private $_parser;
-
private $_opts;
private $_args;
@@ -45,18 +41,16 @@ implements Horde_Qc_Config_Interface
*/
public function __construct(Horde_Qc_Modules $modules)
{
- $options = array();
-
- foreach ($modules as $module) {
- $options = array_merge($options, $module->getOptions());
- }
-
- $this->_parser = new Horde_Argv_Parser(
+ $parser = new Horde_Argv_Parser(
array(
- 'optionList' => array_values($options),
'usage' => '%prog ' . _("[options] PACKAGE_PATH")
)
);
+
+ foreach ($modules as $module) {
+ $parser->addOptionGroup($module->getOptions());
+ }
+
list($this->_opts, $this->_args) = $parser->parseArgs();
}
}
diff --git a/framework/Qc/lib/Horde/Qc/Config/Interface.php b/framework/Qc/lib/Horde/Qc/Config/Interface.php
deleted file mode 100644
index bf0bfeb67..000000000
--- a/framework/Qc/lib/Horde/Qc/Config/Interface.php
+++ /dev/null
@@ -1,33 +0,0 @@
-
- * @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Qc
- */
-
-/**
- * Horde_Qc_Config_Interface:: represents configuration for the Horde quality
- * control tool.
- *
- * Copyright 2010 The Horde Project (http://www.horde.org/)
- *
- * See the enclosed file COPYING for license information (LGPL). If you
- * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
- *
- * @category Horde
- * @package Qc
- * @author Gunnar Wrobel