RE: [fw-general] Passing an object between actions.

2008-12-12 Thread A.J. Brown
Yes, you should avoid global variables (and global variable work-arounds) wherever possible. It creates unnecessary dependencies and can make testing harder. Granted, Zend_Registry could easily be mocked for testing, it's not really ideal. sinkingfish wrote: Thanks for the rapid reply,

RE: [fw-general] Passing an object between actions.

2008-12-11 Thread Jan Pieper
http://framework.zend.com/manual/en/zend.registry.html -Original Message- From: sinkingfish [mailto:[EMAIL PROTECTED] Sent: Thursday, December 11, 2008 6:24 PM To: fw-general@lists.zend.com Subject: [fw-general] Passing an object between actions. Hi, I am looking to pass an

Re: [fw-general] Passing an object between actions.

2008-12-11 Thread Giorgio Sironi
2008/12/11 sinkingfish [EMAIL PROTECTED] I am looking to pass an object (zend_form to be exact) between 2 actions and am wondering is there a best practice or even a facility in zend framework? For a simple approach, I suggest pass it to a placeholder helper. (also the registry is possible

Re: [fw-general] Passing an object between actions.

2008-12-11 Thread Jason Webster
As far as I know, you do not have to serialize arrays or objects if you pass them as a parameter to _forward(). The _forward() method does not create a new HTTP request, it just bounces the current request object around within the dispatching process. sinkingfish wrote: Hi, I am looking to

RE: [fw-general] Passing an object between actions.

2008-12-11 Thread sinkingfish
Thanks for the rapid reply, I thought the registry was more for things like static values, ie configs db connections. Jan Pieper-2 wrote: http://framework.zend.com/manual/en/zend.registry.html -Original Message- From: sinkingfish [mailto:sinkingf...@gmail.com] Sent: Thursday,

Re: [fw-general] Passing an object between actions.

2008-12-11 Thread sinkingfish
Cool thanks, I'll have a look at it when I get back into work. If I do a forward are the original values from the request still accessible? ta Brian jasonistaken wrote: As far as I know, you do not have to serialize arrays or objects if you pass them as a parameter to _forward(). The