Search the web
Sign In
New User? Sign Up
zf-tool · ZFTool
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Problem Parsing Command Line Parameters   Message List  
Reply | Forward Message #50 of 73 |
I'm not sure if this is an issue with Zend_Tool or Zend_Console_Getopt, but I figured that I'd post it here since this is where I've encountered it. According to the Zend_Tool_Rpc_Endpoint_Cli Component Proposal, you can specify boolean values for action parameters like this:

zf show version --details=true

However, the actual ZendL_Tool_Rpc_System_Provider_Version::show() function takes two parameters: mode and nameincluded. If I try and pass false to nameincluded, I still get the verbose output:

~ $ zf show version --mode=mini --nameincluded=false
Zend Framework Version: 1.6.1

However, if I specify it as a numeric parameter instead, it works as expected:

~ $ zf show version --mode=major --nameincluded=0
1

I checked the value of $nameincluded being passed to the show() method and it is the string "false", not the boolean value false. However, the code simply does:

        if ($nameincluded) {
            $output = 'Zend Framework Version: ' . $output;
        }

The reason why I'm not sure whether this is an issue with Zend_Tool or Zend_Console_Getopt is: should ZendL_Tool_Rpc_System_Provider_Version::show() expect to receive a parsed boolean parameter or is it unrealistic to expect the Zend_Console_Getopt code to parse string representations of boolean values to their corresponding boolean values? Obviously PHP itself silently handles converting "0" into the numeric value 0, but this isn't the case for "true" and "false". How do we want to help it along?

Thu Sep 25, 2008 6:52 am

dave_walter
Offline Offline
Send Email Send Email

Forward
Message #50 of 73 |
Expand Messages Author Sort by Date

I'm not sure if this is an issue with Zend_Tool or Zend_Console_Getopt, but I figured that I'd post it here since this is where I've encountered it. According...
dave_walter
Offline Send Email
Sep 25, 2008
6:52 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help