*/
/**
- * Represents a command line invocation.
+ * Represents a command line request invocation.
*
* @author Mike Naberezny <mike@maintainable.com>
* @author Derek DeVries <derek@maintainable.com>
protected $_argv;
/**
+ * Constructor
+ *
+ * In addition to the $options from Horde_Controller_Request_Base, you can
+ * pass a 'path' argument as a string, or a Horde_Argv_Parser object as
+ * 'argvParser' to override the path of the cli request.
*/
public function __construct($options = array())
{
parent::__construct($options);
- $this->setPath();
+ $pathArgs = null;
+ if (isset($options['path'])) {
+ $pathArgs = $options['path'];
+ } elseif (isset($options['argvParser'])) {
+ $pathArgs = $options['argvParser'];
+ }
+
+ $this->setPath($pathArgs);
}
public function getUri()