Hi,

I created a hydrator class to pass values from a user object to an array
and vice versa. Works perfectly in combination with a service and a data
mapper. So far.

But now I have a form that uses the hydrator as well to create an object
after validation. Now the current workflow is like such:

- the controller passes the post form data as an array to the service
- the service takes the array, creates the form, fills the form with
  array data, uses the hydrator to get an object with validated data
  and passes this object to my mapper
- the mapper takes the object, uses the hydrator to get the array data
  and passes this array data to a tableGateway object

I have a couple questions:

a) Does this workflow really make sense?

b) Where to set default values: in the service or the mapper?

c) I have a password field which should be cleared when passed to an
   edit form. Where to clear it? If I use the extract() method of my
   hydrator, the password is cleared as well when passed to the
   mapper for writing data?

d) Should I forget about the object binding when validating a form
   and just pass the validated array data to my mapper?

Has anyone had the same problems and could please advise me?

Thanks and best regards,

Ralf

-- 
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to