<?xml version="1.0"?>
<?xml-stylesheet
href="http://www.w3.org/2000/08/w3c-synd/style.css" type="text/css"
?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel rdf:about="http://pear.php.net/bugs/search.php">
    <title>PEAR Bug Search Results</title>
    <link>http://pear.php.net/bugs/search.php?cmd=display&amp;package_name%5B0%5D=Console_Getargs</link>
    <description>Search Results</description>
    <dc:language>en-us</dc:language>
    <dc:creator>pear-webmaster@lists.php.net</dc:creator>
    <dc:publisher>pear-webmaster@lists.php.net</dc:publisher>
    <admin:generatorAgent rdf:resource="http://pear.php.net/bugs"/>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <sy:updateBase>2000-01-01T12:00+00:00</sy:updateBase>
    <items>
     <rdf:Seq>
      <rdf:li rdf:resource="http://pear.php.net/bug/15010" />
      <rdf:li rdf:resource="http://pear.php.net/bug/14122" />
      <rdf:li rdf:resource="http://pear.php.net/bug/10988" />
      <rdf:li rdf:resource="http://pear.php.net/bug/9583" />

     </rdf:Seq>
    </items>
  </channel>

  <image rdf:about="http://pear.php.net/gifs/pearsmall.gif">
    <title>PEAR Bugs</title>
    <url>http://pear.php.net/gifs/pearsmall.gif</url>
    <link>http://pear.php.net/bugs</link>
  </image>

    <item rdf:about="http://pear.php.net/bug/15010">
      <title>Console_Getargs: Feature/Change Request 15010 [Open] Optimize --help display</title>
      <link>http://pear.php.net/bugs/15010</link>
      <content:encoded><![CDATA[<pre>Console_Getargs Feature/Change Request
Reported by cweiske
2008-11-13T03:57:03+00:00
PHP: Irrelevant OS:  Package Version: 

Description:
------------
The --help output of the &quot;pci&quot; tool is somewhat inefficient: Parameters take most of the horizontal space, while the description itself has only very little space.

I suggest to not write &quot;(optional)value&quot; but &quot;[value]&quot; which is quite common.</pre>]]></content:encoded>
      <description><![CDATA[<pre>Console_Getargs Feature/Change Request
Reported by cweiske
2008-11-13T03:57:03+00:00
PHP: Irrelevant OS:  Package Version: 

Description:
------------
The --help output of the &quot;pci&quot; tool is somewhat inefficient: Parameters take most of the horizontal space, while the description itself has only very little space.

I suggest to not write &quot;(optional)value&quot; but &quot;[value]&quot; which is quite common.</pre>]]></description>
      <dc:date>2008-11-13T11:58:12+00:00</dc:date>
      <dc:creator>cweiske &amp;#x61;&amp;#116; php &amp;#x64;&amp;#111;&amp;#x74; net</dc:creator>
      <dc:subject>Console_Getargs Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/14122">
      <title>Console_Getargs: Documentation Problem 14122 [Open] Console_Getargs has no documentation</title>
      <link>http://pear.php.net/bugs/14122</link>
      <content:encoded><![CDATA[<pre>Console_Getargs Documentation Problem
Reported by cweiske
2008-06-11T08:33:36+00:00
PHP: Irrelevant OS:  Package Version: 1.3.4

Description:
------------
peardoc doesn't have anything about Console_Getargs</pre>]]></content:encoded>
      <description><![CDATA[<pre>Console_Getargs Documentation Problem
Reported by cweiske
2008-06-11T08:33:36+00:00
PHP: Irrelevant OS:  Package Version: 1.3.4

Description:
------------
peardoc doesn't have anything about Console_Getargs</pre>]]></description>
      <dc:date>2008-06-11T08:33:36+00:00</dc:date>
      <dc:creator>cweiske &amp;#x61;&amp;#116; php &amp;#x64;&amp;#111;&amp;#x74; net</dc:creator>
      <dc:subject>Console_Getargs Documentation Problem</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/10988">
      <title>Console_Getargs: Feature/Change Request 10988 [Open] Allow accumulating unknown options as parameters</title>
      <link>http://pear.php.net/bugs/10988</link>
      <content:encoded><![CDATA[<pre>Console_Getargs Feature/Change Request
Reported by amirabiri
2007-05-09T04:33:42+00:00
PHP: 5.1.6 OS:  Package Version: 1.3.4

Description:
------------
Add the ability to have unknown options and switches encountered in the command line not generate an error but instead added to the parameters list.

This in turn allows iterative parsing of the command line options, as the parameters list can be used as the input for the next use of the package.

That is important in situations where the switches determine the loading of some package which then defines its own switches or otherwise refines the behaviour of the command line parser.</pre>]]></content:encoded>
      <description><![CDATA[<pre>Console_Getargs Feature/Change Request
Reported by amirabiri
2007-05-09T04:33:42+00:00
PHP: 5.1.6 OS:  Package Version: 1.3.4

Description:
------------
Add the ability to have unknown options and switches encountered in the command line not generate an error but instead added to the parameters list.

This in turn allows iterative parsing of the command line options, as the parameters list can be used as the input for the next use of the package.

That is important in situations where the switches determine the loading of some package which then defines its own switches or otherwise refines the behaviour of the command line parser.</pre>]]></description>
      <dc:date>2007-05-09T04:33:42+00:00</dc:date>
      <dc:creator>amir_abiri &amp;#x61;&amp;#116; ipcmedia &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>Console_Getargs Feature/Change Request</dc:subject>
    </item>
    <item rdf:about="http://pear.php.net/bug/9583">
      <title>Console_Getargs: Bug 9583 [Analyzed] Console Args isDefined not working correctly</title>
      <link>http://pear.php.net/bugs/9583</link>
      <content:encoded><![CDATA[<pre>Console_Getargs Bug
Reported by erudd@...
2006-12-08T10:54:01+00:00
PHP: 5.1.6 OS: Fedora Core 6 x86_64 Package Version: 1.3.4

Description:
------------
The fix for bug #9252 has now broken several of my applications.  The scenario:

I have this piece in my config array.

    'export' =&gt; array(
        'min'=&gt;1,
        'max'=&gt;1,
        'desc'=&gt;&quot;Export data for this company&quot;),
    'import' =&gt; array(
    	'min'=&gt;1,
    	'max'=&gt;1,
    	'desc'=&gt;&quot;Import data for this company&quot;),

But I only want to require import OR export (XOR) and I was doing a check in  the PEAR::isError else to test that scenario.

Now I changed my script to specify a default of '' for those two args and my &quot;else&quot; check is now hit, however doesn't work correctly as BOTH import and export are now &quot;defined&quot; even though I only specified one of them.


Test script:
---------------
require_once &quot;PEAR.php&quot;;
require_once &quot;Console/Getargs.php&quot;;

$args =&amp; Console_Getargs::factory($config = array(
    'export' =&gt; array(
        'min'=&gt;1,
        'max'=&gt;1,
        'desc'=&gt;&quot;Export data for this company&quot;),
    'import' =&gt; array(
    	'min'=&gt;1,
    	'max'=&gt;1,
    	'desc'=&gt;&quot;Import data for this company&quot;),
));

if (PEAR::isError($args)) {
        if ($args-&gt;getCode() === CONSOLE_GETARGS_ERROR_USER) {
                echo Console_Getargs::getHelp($config, null, $args-&gt;getMessage()).&quot;\n&quot;;
        } elseif ($args-&gt;getCode() === CONSOLE_GETARGS_HELP) {
                echo Console_Getargs::getHelp($config).&quot;\n&quot;;
        }
        exit;
} elseif ((!$args-&gt;isDefined('export') &amp;&amp; !$args-&gt;isDefined('import')) || ($args-&gt;isDefined('export') &amp;&amp; $args-&gt;isDefined('import'))) {
	echo Console_Getargs::getHelp($config, null, &quot;\nMust specify either --export OR --import&quot;).&quot;\n\n&quot;;
	echo &quot;dump:&quot;.$args-&gt;isDefined('export').&quot;\n&quot;;
	echo &quot;dump:&quot;.$args-&gt;isDefined('import').&quot;\n&quot;;
	exit;
}

Expected result:
----------------
only the variables specified on the command line should be &quot;defined&quot;

Actual result:
--------------
all variables are being treated as &quot;defined&quot;</pre>]]></content:encoded>
      <description><![CDATA[<pre>Console_Getargs Bug
Reported by erudd@...
2006-12-08T10:54:01+00:00
PHP: 5.1.6 OS: Fedora Core 6 x86_64 Package Version: 1.3.4

Description:
------------
The fix for bug #9252 has now broken several of my applications.  The scenario:

I have this piece in my config array.

    'export' =&gt; array(
        'min'=&gt;1,
        'max'=&gt;1,
        'desc'=&gt;&quot;Export data for this company&quot;),
    'import' =&gt; array(
    	'min'=&gt;1,
    	'max'=&gt;1,
    	'desc'=&gt;&quot;Import data for this company&quot;),

But I only want to require import OR export (XOR) and I was doing a check in  the PEAR::isError else to test that scenario.

Now I changed my script to specify a default of '' for those two args and my &quot;else&quot; check is now hit, however doesn't work correctly as BOTH import and export are now &quot;defined&quot; even though I only specified one of them.


Test script:
---------------
require_once &quot;PEAR.php&quot;;
require_once &quot;Console/Getargs.php&quot;;

$args =&amp; Console_Getargs::factory($config = array(
    'export' =&gt; array(
        'min'=&gt;1,
        'max'=&gt;1,
        'desc'=&gt;&quot;Export data for this company&quot;),
    'import' =&gt; array(
    	'min'=&gt;1,
    	'max'=&gt;1,
    	'desc'=&gt;&quot;Import data for this company&quot;),
));

if (PEAR::isError($args)) {
        if ($args-&gt;getCode() === CONSOLE_GETARGS_ERROR_USER) {
                echo Console_Getargs::getHelp($config, null, $args-&gt;getMessage()).&quot;\n&quot;;
        } elseif ($args-&gt;getCode() === CONSOLE_GETARGS_HELP) {
                echo Console_Getargs::getHelp($config).&quot;\n&quot;;
        }
        exit;
} elseif ((!$args-&gt;isDefined('export') &amp;&amp; !$args-&gt;isDefined('import')) || ($args-&gt;isDefined('export') &amp;&amp; $args-&gt;isDefined('import'))) {
	echo Console_Getargs::getHelp($config, null, &quot;\nMust specify either --export OR --import&quot;).&quot;\n\n&quot;;
	echo &quot;dump:&quot;.$args-&gt;isDefined('export').&quot;\n&quot;;
	echo &quot;dump:&quot;.$args-&gt;isDefined('import').&quot;\n&quot;;
	exit;
}

Expected result:
----------------
only the variables specified on the command line should be &quot;defined&quot;

Actual result:
--------------
all variables are being treated as &quot;defined&quot;</pre>]]></description>
      <dc:date>2008-05-10T22:54:54+00:00</dc:date>
      <dc:creator>erudd &amp;#x61;&amp;#116; netfor &amp;#x64;&amp;#111;&amp;#x74; com</dc:creator>
      <dc:subject>Console_Getargs Bug</dc:subject>
    </item>
</rdf:RDF>
