Cool, thx for taking a look :)

2009/3/13 Matthew Weier O'Phinney <[email protected]>:
> -- keith Pope <[email protected]> wrote
> (on Friday, 13 March 2009, 08:36 AM +0000):
>> I am currently trying to create a Model using Zend_Form for input
>> filtering and was hoping to get some feedback on the design.
>>
>> I am creating a User model, I have three different context in which it
>> will be used:
>>
>> a) user registration
>> b) registered users editing their details
>> c) admin user add, editing, deleting users
>>
>> My question is what is the best way to use Zend_Form for slightly
>> different contexts, so when an admin is editing a user they would have
>> more fields etc. My current solution is to use multiple form classes
>> and inheritance to specialize them.
>>
>> Is this the best way to do this?
>
> That's how I'd do it.
>
>> Code is here:
>>
>> http://code.google.com/p/zendframeworkstorefront/source/browse/branches/TRY-KP-Zapp/application/modules/storefront/models/User.php
>> http://code.google.com/p/zendframeworkstorefront/source/browse/#svn/branches/TRY-KP-Zapp/application/modules/storefront/forms/User
>
> --
> Matthew Weier O'Phinney
> Software Architect       | [email protected]
> Zend Framework           | http://framework.zend.com/
>



-- 
----------------------------------------------------------------------
[MuTe]
----------------------------------------------------------------------

Reply via email to