Reputation: 12481
In our application, we have certain scenarios where we'd like to perform a redirect and pass a long string to the next controller/action. I'm familiar with both of these:
$this->_redirect('/controller/action?string=thisistheverylongstring);
But would like to avoid showing the user the string as part of the URL.
Throwing the string in $this->view doesn't help because after a redirect, a new request is created.
As far as I know, using $this->_helper->redirector() has the same problem.
Upvotes: 2
Views: 3789
Reputation: 105878
I'm not super familiar with ZF's controller system so I can't give you a bespoke recommendation.
Is using a session value out of the question? Another popular framework, symfony, uses what they call "flash" variables which are session values that survive for only 1 more request.
I'm sure you could do something similar with ZF.
Upvotes: 4