Hi,

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?

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

Any suggestions would be great :)

Thx

Keith

Reply via email to