I'm having a bit of trouble figuring this one out. I have a controller action
in my application that expects an input parameter to be an array of values.
The form that submits to this page sends the input parameters in the
traditional format of
"http://www.mydomain.com/controller/action?param[]=one¶m[]=two", etc.
I need to be able to redirect to this page internally using a route, but I
cannot figure out how to pass along the parameter that is an array.
Ex:
$requestParameters = array(
'controller' => 'packages',
'action' => 'create',
'module' => 'packagebuilder',
'items' => array(
'item_1',
'item_2',
'item_3',
)
);
// $redirector is an instance of Zend_Controller_Action_Helper_Redirector
$redirector->goToRoute(
$requestParameters,
NULL,
TRUE
);
It doesn't look like the routers take into account inputs as arrays when
assembling, as somewhere in the mix, urlencode is passed an array (assuming
it's my parameter array) and it builds it using the Zend Framework MVC
convention of
"http://www.mydomain.com/controller/action/param1/one/param2/two", etc.
Has anyone solved this issue before or can anyone point me in the right
direction?
--
View this message in context:
http://n4.nabble.com/Input-Parameters-as-arrays-GET-and-Zend-Controller-Action-Helper-Redirector-goToRoute-tp1013430p1013430.html
Sent from the Zend Framework mailing list archive at Nabble.com.