Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.0.10

Request #2689 perform() methods of action classes should probably return values
Submitted: 2004-11-04 16:39 UTC
From: mflaherty at clearmessage dot com Assigned: avb
Status: Closed Package: HTML_QuickForm_Controller
PHP Version: 4.3.3 OS:
Roadmaps: (Not assigned)    
Subscription  


 [2004-11-04 16:39 UTC] mflaherty at clearmessage dot com
Description: ------------ The built-in action handlers, apart from Direct, have perform() methods that do not return values. HTML_QuickForm_Action_Direct::perform() returns the result of Jump, which does not itself return anything. Since HTML_QuickForm_Action_Jump::perform() results in a Location redirect it would not ever return anyway. When working with HTML_QuickForm_Controller I've found it beneficial to override the Submit action handler so that perform() returns the result of $page->handle('process'). By doing this, I'm able to pass return values to the calling script through HTML_QuickForm_Controller::run(). This is very useful as without this ability, I believe an unacceptable level of presentation coupling is required within the process action handler. I'm not sure whether any of the other action handlers ought to return values from perform() since if one wanted to customize such an action handler one would most likely override perform() anytway. On the other hand I can't see how it could hurt. I hope this has been clear. Thank you for your time. Expected result: ---------------- HTML_QuickForm_Action_Submit::perform() returns the result of $page->handle('process'), $page->handle('display') or $target->handle('jump'). Actual result: -------------- HTML_QuickForm_Action_Submit::perform() never returns a value to the caller.

Comments

 [2004-11-04 20:32 UTC] mflaherty at clearmessage dot com
I've realised that this is relevant to the HTML_QuickForm_Controller package. Apologies for the error.
 [2004-11-05 14:36 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2004-11-26 10:53 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!