--- /dev/null
+<?php
+
+require_once 'Horde/Autoloader.php';
+require_once 'Horde/Autoloader/ClassPathMapper.php';
+require_once 'Horde/Autoloader/ClassPathMapper/Default.php';
+
+class Horde_Qc_Autoloader extends Horde_Autoloader
+{
+ public function __construct()
+ {
+ foreach (array_reverse(explode(PATH_SEPARATOR, get_include_path())) as $path) {
+ if ($path == '.') { continue; }
+ $path = realpath($path);
+ if ($path) {
+ $this->addClassPathMapper(new Horde_Autoloader_ClassPathMapper_Default($path));
+ }
+ }
+ }
+}
+
+$__autoloader = new Horde_Qc_Autoloader();
+$__autoloader->registerAutoloader();
erver
*/
class Horde_Qc_Config_Cli
-implements Horde_Qc_Config_Interface
{
-
- private $_parser;
-
private $_opts;
private $_args;
*/
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();
}
}
+++ /dev/null
-<?php
-/**
- * Horde_Qc_Config_Interface:: represents configuration for the Horde quality
- * control tool.
- *
- * PHP version 5
- *
- * @category Horde
- * @package Qc
- * @author Gunnar Wrobel <wrobel@pardus.de>
- * @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 <wrobel@pardus.de>
- * @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Qc
-erver
- */
-interface Horde_Qc_Config_Interface
-{
-}
\ No newline at end of file
<dir name="lib">
<dir name="Horde">
<dir name="Qc">
+ <file name="Autoloader.php" role="php" />
<dir name="Config">
<file name="Cli.php" role="php" />
<file name="Interface.php" role="php" />
</dependencies>
<phprelease>
<filelist>
+ <install as="Horde/Qc/Autoloader.php" name="lib/Horde/Qc/Autoloader.php" />
<install as="Horde/Qc/Config/Cli.php" name="lib/Horde/Qc/Config/Cli.php" />
<install as="Horde/Qc/Config/Interface.php" name="lib/Horde/Qc/Config/Interface.php" />
<install as="hqc" name="script/horde-quality-control.php" />
#!/usr/bin/env php
<?php
-require_once('Horde/Autoloader.php');
+require_once 'Horde/Qc/Autoloader.php';
Horde_Qc::main();